On 13-Jul-01 David Tomās Fargas wrote:
> I Have a large table with 59.000 records and if i execute a simple select
> since "Select * from table order by cod" it takes 4 seconds to process
> query!
> and if table will have 590.000 then... well, you see it.
> 
> It's possible to accelerate it, without where and limit clausules?
> 

do you have an index on cod ?

> I think no, and in my find of solutions I develop an idea...
> 
> If I execute the same query with a where clausule with unique value, and
> limit clausule to 1 value it results fine in an instant.
> Ok I have one record, and I need to go to next or previous record...
> 
> And then...it's a big problem!
> 
> Because the query is sorted and, of course, I don't have any idea the
> primary value for the next and previous record, How can I execute another
> query to obtain those records?
> 
> I think I need a "imaginary value" in te record that gives me the position
> of the current record in a totally table. Because the table are sorted, the
> autonumeric fields can't help me.
> 

 sorted ?

> And if i simple use a variable in my application to monitoring the
> ficticious sorted position and play with the limit clause, I will can't set
> big jumps fast between records  such a search tool ...
> 
> how can I get this "imaginary value"?
> 

You lost me.
Please post describe table and a couple of example rows of the dataset

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to