Re: query plan and parenthesis - Mailing list pgsql-general

From Christoph Haller
Subject Re: query plan and parenthesis
Date
Msg-id 3EE9BDE3.82597CF4@rodos.fzk.de
Whole thread Raw
In response to query plan and parenthesis  (Jan Poslusny <pajout@gingerall.cz>)
List pgsql-general
>
> Thanks for answer, but:
> I did not want to determine the order of nesting, so I wrote something

> like CREATE VIEW myview AS SELECT ... FROM t1 INNER JOIN t2 ON ...
INNER
> JOIN t3 ON ... ; - without parenthesis
> When I read output of '\d myview', I found parenthesis.
I see.
> I think I must set some appropriate nesting order when I am defining
the
> view - optimizer are not able to resolve it from internally stored
> definition.
>
Another thought:
There has been recently a discussion on the hackers list about
unnecessary
parenthesesing while storing view definitions. The conclusion was it's
far too
error prone to start something like that. Because indeed there is no win
at all
regarding query execution in defining a view, you may consider skip the
definition
and leave it to the optimizer when preparing the original query.
Regards, Christoph



pgsql-general by date:

Previous
From: "Daniel Gehrke"
Date:
Subject: Insert NULL for ''
Next
From: Patrick Welche
Date:
Subject: Re: [HACKERS] SAP and MySQL ... [and Benchmark]