pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Luke Lonergan <LLonergan@greenplum.com>
Cc: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Anton <anton200@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1
Date: Sun, 28 Oct 2007 01:20:26 +0100
Message-ID: <87abq4ytrp.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <C3E62232E3BCF24CBA20D72BFDCB6BF8044A24A3@MI8NYCMAIL08.Mi8.com>
References: <C3E62232E3BCF24CBA20D72BFDCB6BF8044A24A3@MI8NYCMAIL08.Mi8.com>


"Luke Lonergan" <LLonergan@greenplum.com> writes:

> The approach we took was to recognize the ordering of child nodes and
> propagate that to the append in the special case of only one child (after
> CE). This is the most common use-case in 'partitioning', and so is an easy,
> high payoff low amount of code fix.

Ah yes, we should definitely try to prune singleton append nodes. On a lark I
had tried to do precisely that to see what would happen but ran into precisely
the problem you had to solve here with your pullup_vars function. That's one
of the functions which wasn't included in the original patch so I'll look at
the patch from the queue to see what's involved.

Actually currently it's not a common case because we can't eliminate the
parent partition. I have some ideas for how to deal with that but haven't
written them up yet.

In theory if we can preserve ordering across append nodes there's no good
reason to prune them. But generally I think simplifying the plan is good if
only to present simpler plans to the user. 

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com



view thread (33+ messages)  latest in thread

Message-ID: <87abq4ytrp.fsf@oxford.xeocode.com>
Permalink:  ../87abq4ytrp.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/87abq4ytrp.fsf@oxford.xeocode.com

 · 

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: stark@enterprisedb.com, LLonergan@greenplum.com, heikki@enterprisedb.com, anton200@gmail.com
  Subject: Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1
  In-Reply-To: <87abq4ytrp.fsf@oxford.xeocode.com>

* 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