from foo a, (select field2 from bar where *condition*) b
where a.field2 = b.field2
from foo a
where a.field2 = any (select field2 from bar where *condition*)
I'm simplifying a bit so it is possible that the actual specifics of
*condition* are making a difference, but as far as my limited
knowledge goes, I imagine not. case2 btw takes more than 10 times
longer than case1.
And aside from the specific answer to this question, could anyone
recommend any online tutorials for query tuning?...