Josh Trutwin wrote:

>The first query averages about 0.085 seconds from the mysql prompt, the
>second about 0.075 seconds and the 3rd 0.065 seconds.
>
>Thanks for some great advice, this has been bugging me for a while!
>  
>
Its well appreciated to see examples of what works and what doesn't too; 
its nice to know how to get one's queries in an order that makes the 
MySQL optimizer's life easier.  I'm trying to decide if there's some 
logical way to inform MySQL that it can reorder a series of JOINs any 
way it likes for best performance.  At any rate, try ordering your JOINs 
in such a way as to eliminate the most rows as soon as possible, and see 
if that makes a difference; if your 'smallest tables first' query does 
in fact do that, then great.

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



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