I have a table with an integer auto increment primary key, INVNUM, and a
CHAR(48) field NAME.
Is there a way I can have my table presorted by the text field, so that a
select call with "ORDER BY NAME" is just as fast as "ORDER BY INVNUM"? I
have tried indexing the textfield, both a few leading characters and the
entire field, but both have no effect. The text field is not unique. The
difference in time between these two queries is about 3 seconds:
SELECT INVNUM FROM INVOICES ORDER BY INVNUM;
SELECT INVNUM FROM INVOICES ORDER BY NAME;
Thanks,
David ([EMAIL PROTECTED])
---------------------------------------------------------------------
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