Skip site navigation (1) Skip section navigation (2)

Re: Path question

From: PostgreSQL - Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Path question
Date: 2010-09-01 14:28:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sep 1, 2010, at 4:10 PM, Tom Lane wrote:

> Boszormenyi Zoltan <zb(at)cybertec(dot)at> writes:
>> we are experimenting with modifying table partitioning
>> so the ORDER BY clause can be pushed down to
>> child nodes on the grounds that:
> This is really premature, and anything you do along those lines now will
> probably never get committed.  The problem is that the transformation
> you propose is wrong unless the planner can prove that the different
> child tables contain nonoverlapping ranges of the sort key.  Now you
> might be intending to add logic to try to prove that from inspection of
> constraints, but I don't believe that reverse-engineering such knowledge
> on the fly is a sane approach: it will be hugely expensive and will add
> that cost even in many situations where the optimization fails to apply.

well, why non-overlapping? the idea is to make append smart enough to take the sorted lists from below and merge them which will give sorted output as well.
my original idea was what you described but given Martijn van Oosterhout's posting we were pretty confident that we can get along without non-overlapping partitions.

> The project direction is that we are going to add some explicit
> representation of partitioned tables.  After that, the planner can just
> know immediately that a range-partitioned sort key is amenable to this
> treatment, and at that point it'll make sense to work on it.

can you outline some ideas here and maybe point to some useful discussion here?

	many thanks,


Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria

In response to


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-09-01 14:39:53
Subject: Re: register/unregister standby Re: Synchronous replication
Previous:From: Greg StarkDate: 2010-09-01 14:21:25
Subject: Re: Path question

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group