From: Dan Nelson Date: September 27 2003 1:11am Subject: Re: Can someone explain the difference between these two queries? List-Archive: http://lists.mysql.com/mysql/150608 Message-Id: <20030927011118.GA57218@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Sep 26), David Griffiths said: > ----- Original Message ----- > From: "Mike R. Duncan" > To: "Director General: NEFACOMP" ; > ; > Sent: Thursday, September 25, 2003 2:55 PM > Subject: RE: Ideas on creating connections Please don't hijack threads. [ snip 2 queries ] > > The first one takes 1.73 seconds, the other takes 0.34 seconds. > > The only difference is the order of the tables (address_list comes > last in the FROM clause in the first example, and is in the middle of > the FROM clause in the second example)... What does an EXPLAIN SELECT .. on both queries print? LEFT JOINs definitely impose a table order, and it's possible MySQL is incorrectly ordering other joins on those tables. You didn't mention what version of MySQL you are using, btw. -- Dan Nelson dnelson@stripped