I do use ORDER BY by meet_hnd DESC.


In trying to optimize queries on this db, can I assume the following:

In searching for a result on meet_hnd (which is indexed) using the ORDER
BY clause not only affects the was the data is returned but also the
method by which the results are searched on:

ORDER BY ... DESC - starts from bottom
ORDER BY ... ASC - starts from top

not specifying order will result in a BDT search.

--------------------
Adam C Buggia

DirectAthletics Inc.
W: 978 927 7188
C: 781 608 5952

On Thu, 22 Feb 2001, Jason Landry wrote:

> > I am the dba for a track and field results web site, when people look for
> > results they are most likely going to want results from a more recent meet
> > (rather than older meets).
> >
> > there is a table result and a table meet where a column in result is
> > "meet_hnd." (there maybe hundreds of results per meet)  so I have indexed
> > the result table on meet_hnd.  This sped things up dramatically.  Now, the
> > I see it, though we are indexed on meet_hnd, when searching for results
> > mysql is starting at the first meet_hnd though we are most likely wanting
> > to retrieve the last meet_hnd.  If this were indexed in reverse order than
> > the first meet_hnd would most likely be the one we are looking for.
> 
> Have you tried an ORDER BY meet_hnd DESC on your query?
> 
> 



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