Re: Planning aggregates which require sorted or distinct - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Planning aggregates which require sorted or distinct
Date
Msg-id 20070120121815.GN26080@alvh.no-ip.org
Whole thread Raw
In response to Re: Planning aggregates which require sorted or distinct  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Planning aggregates which require sorted or distinct  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Simon Riggs wrote:

> I'm working on modifying Tuplestore that will allow you to store the
> last N tuples, rather than all previous input. This is specifically
> designed to allow Merge Join to do Mark/Restore without materializing
> the whole sort set. This can also be used to materialize Windows (i.e.
> <window clause> in SQL:2003), so you can store the current row plus n
> PRECEDING and/or n FOLLOWING rows as appropriate.

Interesting.  This could also be used to implement the "partial sort"
stuff that Oleg is so interested in, and in which I believe Greg Stark
was also interested.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Planning aggregates which require sorted or distinct
Next
From: Gavin Sherry
Date:
Subject: Re: Planning aggregates which require sorted or distinct