Filtering in JOIN clause - any performance issues ?
452507May 23 2007 — edited May 23 2007Does filtering rows in the JOIN clause rather than the WHERE clause make any difference to query performance - is it slower ? e.g.
--filter in JOIN
select *
from tableA join tableB on tableA.OrderID = tableB.OrderID AND tableB.Status = "XYZ"
--filter in WHERE
select *
from tableA join tableB on tableA.OrderID = tableB.OrderID
where tableB.Status = "XYZ"
As a matter of style, I much prefer joins in the join clause, and filtering in the WHERE clause, but other developers are filtering in the JOIN clause. The brief tests I've done seem give the same query plan for a simple queries like this, but does anyone know for sure ? I don't know what more complex queries might do.
Thanks.