Re: WITHIN GROUP patch - Mailing list pgsql-hackers

From David Rowley
Subject Re: WITHIN GROUP patch
Date
Msg-id CAApHDvq-nPdOgiYSLRce4BSzbmBbMLMyRt468XxHdVP2B7gnsw@mail.gmail.com
Whole thread Raw
In response to Re: WITHIN GROUP patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, Jan 5, 2014 at 12:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Looking at this example makes me wonder if it wouldn't be worthwhile to
provide a way to reset and re-use a tuplesort object, instead of redoing
all the lookup work involved.  Or maybe just find a way to cache the
catalog lookups that are happening inside tuplesort_begin_datum, which are
about 50% of that function's cost it looks like.  We're paying this same
kind of price for repeated tuplesort setup in the existing nodeAgg code,
if we have an aggregate with ORDER BY or DISTINCT in a grouped query with
many groups.


This sounds very similar to:
A reset function was added in the next patch which improved performance in my test case by about 5 times.

Perhaps they can make use of the same function.

Regards

David Rowley
 
                        regards, tom lane


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: "MauMau"
Date:
Subject: Re: [bug fix] multibyte messages are displayed incorrectly on the client
Next
From: Craig Ringer
Date:
Subject: Re: Fixing pg_basebackup with tablespaces found in $PGDATA