Re: Any was to prevent a join if no columns are selected from a view?

From: Royce Ausburn <royce(dot)ml(at)inomial(dot)com>
To: mailing(dot)lists(at)octgsoftware(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Any was to prevent a join if no columns are selected from a view?
Date: 2011-09-30 04:59:33
Message-ID: A1D6E5EA-884F-4F46-8DFB-3EE4547333A4@inomial.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 30/09/2011, at 8:57 AM, Jason Long wrote:

> I thought I had read somewhere that Postges could ignore a join if it
> was not necessary because there were no columns from the table or view
> selected in the query. Is this possible?

You might be thinking of this enhancement introduced in 9.0:

http://www.postgresql.org/docs/9.0/static/release-9-0.html#AEN99923

Remove unnecessary outer joins (Robert Haas)

Outer joins where the inner side is unique and not referenced above the join are unnecessary and are therefore now removed. This will accelerate many automatically generated queries, such as those created by object-relational mappers (ORMs).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Royce Ausburn 2011-09-30 05:04:23 Re: Any was to prevent a join if no columns are selected from a view?
Previous Message Ben Chobot 2011-09-30 04:54:52 Re: Any was to prevent a join if no columns are selected from a view?