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: Klint Gore <kg@kgb.une.edu.au>
Cc: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: horizontal partition
Date: Thu, 03 Feb 2005 01:55:28 -0500
Message-ID: <12896.1107413728@sss.pgh.pa.us> (raw)
In-Reply-To: <200502022241.57799.josh@agliodbs.com>
References: <200502021209.06878.josh@agliodbs.com>
	<ctrtln$d0m$1@floppy.pyrenet.fr>
	<42019B1735F.1271KG@129.180.47.120>
	<200502022241.57799.josh@agliodbs.com>

Josh Berkus <josh@agliodbs.com> writes:
> The issue here is that the planner is capable of "pushing down" the WHERE 
> criteria into the first view, but not into the second, "nested" view, and so 
> postgres materializes the UNIONed data set before perfoming the join.

> Thing is, I seem to recall that this particular issue was something Tom fixed
> a while ago.  Which is why I wanted to know what version Gaetano is using.

It's still true that we can't generate a nestloop-with-inner-indexscan
join plan if the inner side is anything more complex than a single table
scan.  Since that's the only plan that gives you any chance of not
scanning the whole partitioned table, it's rather a hindrance :-(

It might be possible to fix this by treating the nestloop's join
conditions as "push down-able" criteria, instead of the present rather
ad hoc method for generating nestloop/indexscan plans.  It'd be quite
a deal of work though, and I'm concerned about how slow the planner
might run if we did do it like that.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <12896.1107413728@sss.pgh.pa.us>
Permalink:  ../12896.1107413728@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12896.1107413728@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, kg@kgb.une.edu.au, mendola@bigfoot.com
  Subject: Re: horizontal partition
  In-Reply-To: <12896.1107413728@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