Re: Poor plan when joining against a union containing a join - Mailing list pgsql-performance

From Tom Lane
Subject Re: Poor plan when joining against a union containing a join
Date
Msg-id 21700.1362635555@sss.pgh.pa.us
Whole thread Raw
In response to Re: Poor plan when joining against a union containing a join  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Poor plan when joining against a union containing a join
List pgsql-performance
Josh Berkus <josh@agliodbs.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


pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Poor plan when joining against a union containing a join
Next
From: David Leverton
Date:
Subject: Re: Poor plan when joining against a union containing a join