At 16:38 -0400 on 06/23/2004, Michael Stassen wrote about Re: INDEX DESC:

> For example, I want to read ranges of values from my db in the opposite
 order of how they are currently being indexed without using an extra
 ORDER BY in my select. This ORDER BY forces an internal sort to put the
 result set in DESC order which slows my SELECT.

You cannot count on rows being returned in any order unless you explicitly use ORDER BY.

True. What you are ignoring is that if you ORDER BY an INDEXED column, the Index is used to read the records directly without an intervening Sort (so long as both the ORDER BY and the INDEX are ASC). If the Index were defined (and stored) as DESC, then an ORDER BY DESC would likewise just use the Index without the need for the sort that currently must get used.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to