List:General Discussion« Previous MessageNext Message »
From:george larson Date:September 10 2010 1:33pm
Subject:Query conditions
View as plain text  
Hi all.  I've got a greenhorn question but I didn't find the right
keywords to get Google to answer it for me.

Is it more efficient to put conditions in a JOIN instead of sticking
them all at the end in the WHERE clause, or is that just a matter of
preference?  Putting conditions in the JOIN It seems, to me, to at least
make the query easier to read. I was just curious if there were
performance gains as well.
 
Example:

SELECT FROM table1
JOIN table2 ON this > that
WHERE that = '5';

vs

SELECT FROM table1
JOIN table2 WHERE this > that AND that = '5';

Thanks!
G
Thread
Query conditionsgeorge larson10 Sep
  • Re: Query conditionsMichael Dykman10 Sep