Re: WITHIN GROUP patch
От | David Rowley |
---|---|
Тема | Re: WITHIN GROUP patch |
Дата | |
Msg-id | CAApHDvq-nPdOgiYSLRce4BSzbmBbMLMyRt468XxHdVP2B7gnsw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: WITHIN GROUP patch (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Sun, Jan 5, 2014 at 12:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Regards
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 по дате отправления: