Reported By: Jose Eduardo Helminsky Reported On: 7/30/2001 For: Version 2.10 Build 1
# 832Un-Optimized SQL WHERE Clauses Containing the Target Table of an INNER JOIN are too Slow I have the following SQL queries - query 1 and query 2. If I run query 1 the results appear in 130 sec but when I run query 2 the results appear in 0.89 sec. I have noticed that when I put the all the conditions inside the join the query runs faster than when I put it in where.
Query 1:
select code, b.number from table1
inner join table2 on (table1.code=table2.customer)
where table2.field1 = "X"
Query 2:
select code, b.number from table1
inner join table2 on (table1.code=table2.customer and table2.field1 =
"X")
ResolutionScheduled for Future Release on in version 0.00 build 1