Hehe, it's kinda funny when people say things like that.
It depends on what you call a "join". From a certain point of view, an IN
expression is a join too, making subselects a slightly unusual join.
In some ways I think a subselect is the SQL way way of expressing a type of
join that cannot be expressed in the normal way and that with a different
query language, the concept may go away entirely.
I do know that in recent versions of postgres, certain types of subselects
are actually optimised into specific types of joins. It's all just
relational algebra people!
So the moral is, MySQL needs a better query optimiser?
Hope this helps,
On Sun, Nov 30, 2003 at 07:59:09PM +0700, Chris Travers wrote:
> Hi;
>
> The MySQL manual states that Joins perform better than subselects. The
> stated reason is that the planner can better optimize a join.
>
> I am, however, very skeptical of this, and would generally assume things to
> be the other way around.
>
> How do subselects perform in relation to hash joins, etc?
>
> Best Wishes,
> Chris Travers
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato