From: Perrin Harkins Date: February 3 2009 6:46pm Subject: Re: WHERE vs. ON List-Archive: http://lists.mysql.com/mysql/216143 Message-Id: <66887a3d0902031046k615e24a0o3953be2d6c93c0fb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Feb 3, 2009 at 12:24 PM, Jerry Schwartz wrote: > Somebody, I think it was somebody from MySQL, said that you should never put > anything into a WHERE clause that could be put into the ON clause of a JOIN. > My guess is that this helps with the optimization, but it seems > counter-intuitive to me. It seems like it shouldn't make any difference if the optimizer is smart enough, but in my experience it sometimes does. Because of that, I always try to put conditions in the ON clauses when I can, even if they are not about joining the tables. - Perrin