Re: ...WHERE TRUE" condition in union results in bad query pla

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Claus Stadler <cstadler(at)informatik(dot)uni-leipzig(dot)de>, pgsql-performance(at)postgresql(dot)org
Subject: Re: ...WHERE TRUE" condition in union results in bad query pla
Date: 2012-04-03 15:35:34
Message-ID: 7810.1333467334@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sat, Mar 3, 2012 at 10:03 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Sooner or later I'd like to relax the restriction that appendrel members
>> can't have extra WHERE clauses, but don't hold your breath waiting...

> Does this comment need updating?

> * Note: the data structure assumes that append-rel members are single
> * baserels. This is OK for inheritance, but it prevents us from pulling
> * up a UNION ALL member subquery if it contains a join. While that could
> * be fixed with a more complex data structure, at present there's not much
> * point because no improvement in the plan could result.

No, that's a different restriction.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2012-04-03 15:38:34 Re: TCP Overhead on Local Loopback
Previous Message Scott Marlowe 2012-04-03 15:34:30 Re: H800 + md1200 Performance problem