Yes Of course.....The table have a primary key and indexes and the field
used in the order by are indexed (this isn't the primary field, but it's
indexed)


-----Mensaje original-----
De: Huntress Gary B NPRI [mailto:[EMAIL PROTECTED]]
Enviado el: viernes, 13 de julio de 2001 18:10
Para: 'David Tomās Fargas'
Asunto: RE: Dificult question.....


Have you created indexes on that table?

Regards,

Gary Huntress
Code 4113
Naval Undersea Warfare Center
Newport, RI  02841
1-800-669-6892 x28990


-----Original Message-----
From: David Tomās Fargas [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 10:41 AM
To: [EMAIL PROTECTED]
Subject: Dificult question.....


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?

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.

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"?

Have you a new idea for solventing this?

Please, Help me....



---------------------------------------------------------------------
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



---------------------------------------------------------------------
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