Re: What's the difference? - Mailing list pgsql-bugs

From Victor Wagner
Subject Re: What's the difference?
Date
Msg-id Pine.LNX.4.44.0204082312260.18637-100000@banquet.lan.ice.ru
Whole thread Raw
In response to Full path to procedural language in the dump is a bug  (Victor Wagner <vitus@ice.ru>)
Responses Re: What's the difference?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
>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.net      http://www.ice.ru/~vitus

pgsql-bugs by date:

Previous
From: Victor Wagner
Date:
Subject: Full path to procedural language in the dump is a bug
Next
From: Tom Lane
Date:
Subject: Re: Full path to procedural language in the dump is a bug