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

Re: BUG #5543: Poor performance - Index scan backwards not used for order by desc with partitioned tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Ranga Gopalan <ranga_gopalan(at)hotmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5543: Poor performance - Index scan backwards not used for order by desc with partitioned tables
Date: 2010-07-27 23:27:42
Message-ID: 18032.1280273262@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Does it help if you put a CHECK (false) constraint on the parent table?

It won't --- it'll still result in an append plan even if there's only
one surviving child.

This is one of many things that seem to me to not make sense to tackle
until we have an explicit notion of partitioning.  Having the planner
try to prove from individual constraints that it could get a correctly
sorted Append result without an explicit sort step would be hugely
expensive, and complicated --- imagine even trying to pick out the
relevant indexes without any infrastructure to help identify them.
With a partitioned structure we could understand that a-priori.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Robert HaasDate: 2010-07-27 23:46:44
Subject: Re: BUG #5543: Poor performance - Index scan backwards not used for order by desc with partitioned tables
Previous:From: Robert HaasDate: 2010-07-27 23:09:25
Subject: Re: BUG #5543: Poor performance - Index scan backwards not used for order by desc with partitioned tables

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