> >Not so fast there. I have accelerated queries by several 100
> >percent by turning joins into subqueries. On other occasions I
> >did so by turning subqueries into joins. The performance of
> >joins vs subqueries in any non-trivial query depends on a
> >*lot* of variables. You can't just say "use this one" or "use
> >the other" as a blanket statement.
>
> I just did the test of that one. All things being equal I saw
> only a 1%-4% difference between the performance of the two
> variants. I don't think thats enough to even be worth looking
> at.

Let me guess: you tested trivial subqueries but not correlated
ones?

That's where I started.
I think perhaps the correlated subquery optimization is really
another name for rewriting it so the smallest table is the driving table.
It probably doesn't matter how you write the sql as long as
you get the smallest table as the driving table.

Reply via email to