Re: Are left joins more efficient?
| From: | John Hicks | Date: | Sat, 26 Jul 2003 17:52:57 +0000 |
| Subject: | Re: Are left joins more efficient? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157022@lists.php.net to get a copy of this message | ||
Dennis--
You might get a more authoritative answer from the mysql
"general discussion" list at:
http://lists.mysql.com
--John
On Monday 25 August 2003 12:59 pm, anachronism@mengelt.com
wrote:
> Hello,
>
> I program for a website that gets massive loads of
> traffic. Optimisation has become an important issue
> lately.
>
> At the moment, all queries on the website follow the same
> format when joining tables:
> SELECT * FROM table1,table2 WHERE table1.id=table2.id;
>
> My question is, would this format be more efficient?
> SELECT * FROM table1 LEFT JOIN table2 ON
> table1.id=table2.id;
>
> Over the last couple of years I have read and heard two
> different answers. Years ago it was said that doing Left
> Joins are faster and more efficient. But with recent
> updates to MySQL I have read that both queries are broken
> down and optimised the same way by MySQL.
>
> Any thoughts? I havn't come across any comparisons on the
> web, so any answers would be appreciated.
>
> (couldn't find any mysql specific groups so i'm posting
> in the next best thing!)
>
> Thanks
>
> -Dennis