I have a very badly performing sql query. I tracked it down to the INNER JOIN performed on the table. Changing this to LEFT join significantly increases performance (from 6 min to 20 sec) - now i know the 2 are not equiv, but... here is what i am asking
SELECT *
FROM SomeTable ST
JOIN BigTable BT ON BT.SomeID = ST.SomeID
AND BT.Something = ST.Something
AND BT.AnotherValue = '123'
Since the join has additional criteria (and something=something) -- is changing this to a left join producing the same results - but MUCH faster?
The results returned are the same using LEFT/INNER with left being significantly faster...
INNER JOINperforms better. AnOUTER JOINmust return rows even where there isn't a match. Are you sure there's not more to this than the join type?