>Victor Wagner <vitus@ice.ru> writes:
>> As far as I understand, following three queries are exactly equivalent:
>Same results, but the second two constrain the planner's choice of join
>order. See
>http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/explicit-joins.html
>Whether this is a feature or a bug depends on context...
> regards, tom lane
I can agree that this is feature if one uses natural or inner joins.
But if query semantic needs outer joins there is no way to tell the
planner that it is free to choose order of joining.
Only thing left is to join with result of subquery, which makes
entire query much less readable.
I'd think that simpliest way of writing query should result in most
freedom for optimizer to choose an execution plan.
It is so for inner joins, but not for outer ones.
--
Victor Wagner vitus@ice.ru
Chief Technical Officer Office:7-(095)-748-53-88
Communiware.Net Home: 7-(095)-135-46-61
http://www.communiware.nethttp://www.ice.ru/~vitus