Re: Poor plan when joining against a union containing a join

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Poor plan when joining against a union containing a join
Date: 2013-03-07 05:52:35
Message-ID: 21700.1362635555@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Josh Berkus <josh(at)agliodbs(dot)com> writes:
> On 03/06/2013 06:54 AM, David Leverton wrote:
>> I'm encountering very poor query plans when joining against a union,

> Actually, in case #4, Postgres *is* pushing down the join qual into the
> segments of the Union.

Yeah, but not further. I believe the core issue here (as of 9.2) is
that we're not willing to generate parameterized paths for subquery
relations. We could do that without a huge amount of new code,
I think, but the scary thing is how much time it might take to generate
(and then discard most of the) plans for assorted parameterizations of
complicated subqueries.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Leverton 2013-03-07 18:21:52 Re: Poor plan when joining against a union containing a join
Previous Message Josh Berkus 2013-03-06 23:15:08 Re: Poor plan when joining against a union containing a join