MySQL Forums
Forum List  »  Optimizer & Parser

Re: Performance impact of filtering in ON vs WHERE clause
Posted by: Apachez
Date: May 01, 2006 12:54PM

http://dev.mysql.com/doc/refman/5.0/en/join.html

"
The ON conditional is any conditional expression of the form that can be used in a WHERE clause. Generally, you should use the ON clause for conditions that specify how to join tables, and the WHERE clause to restrict which rows you want in the result set.
"

The use of "USING" also points to how joins should be threated...

t1 LEFT JOIN t2 ON (t1.id = t2.id)

is equal to

t1 LEFT JOIN t2 USING (id)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Performance impact of filtering in ON vs WHERE clause
4432
May 01, 2006 12:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.