pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Poor plan when joining against a union containing a join
Date: Thu, 07 Mar 2013 00:52:35 -0500
Message-ID: <21700.1362635555@sss.pgh.pa.us> (raw)
In-Reply-To: <5137CDFC.1060902@agliodbs.com>
References: <CALc3eMXjdWDMRr+48R2LH9fimKHD4JG9aWHDfqmmG=SQPTBVeA@mail.gmail.com>
	<5137CDFC.1060902@agliodbs.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (6+ messages)  latest in thread

Message-ID: <21700.1362635555@sss.pgh.pa.us>
Permalink:  ../21700.1362635555@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21700.1362635555@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
  Subject: Re: Poor plan when joining against a union containing a join
  In-Reply-To: <21700.1362635555@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox