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

Re: Any better plan for this query?..

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Matthew Wakeling <matthew(at)flymine(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dimitri <dimitrik(dot)fr(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Any better plan for this query?..
Date: 2009-05-19 11:36:25
Message-ID: 1242732985.14551.188.camel@ebony.2ndQuadrant (view raw or flat)
Thread:
Lists: pgsql-performance
On Tue, 2009-05-19 at 12:17 +0100, Matthew Wakeling wrote:
> Yes, Postgres has been missing the boat on this one for a while. +1 on
> requesting this feature.

That's an optimizer feature.

> Speaking of avoiding large sorts, I'd like to push again for partial 
> sorts. This is the situation where an index provides data sorted by
> column "a", and the query requests data sorted by "a, b". Currently,
> Postgres sorts the entire data set, whereas it need only group each
> set of identical "a" and sort each by "b".

This is an executor feature.

Partially sorted data takes much less effort to sort (OK, not zero, I
grant) so this seems like a high complexity, lower value feature. I
agree it should be on the TODO, just IMHO at a lower priority than some
other features.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


In response to

Responses

pgsql-performance by date

Next:From: Simon RiggsDate: 2009-05-19 11:41:00
Subject: Re: Any better plan for this query?..
Previous:From: Matthew WakelingDate: 2009-05-19 11:17:47
Subject: Re: Any better plan for this query?..

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