Why we have tuplestore and tuplesort?

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Why we have tuplestore and tuplesort?
Date: 2009-08-15 18:51:10
Message-ID: e08cc0400908151151t5791a998t9314a02626ebdd94@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thinking about window function performance improvement as well as
concerning about GROUPING SETS discussed a couple of days before, I
wonder why we have both of tuplestore and tuplesort. They are very
similar but have different functions such as multiple read pointer
with tuplestore whereas perform_sort with tuplesort. If we integrate
them, nodeWindowAgg, for instance, won't need Sort node before it and
will be able to avoid redundant tuple copy from the tuplesort (on the
Sort node) to the tuplestore.

Looking for git/cvs log a bit, tuplesort was already there since 1999
while tuplestore was introduced around 2000 for materialized node. Why
then was tuplestore invented as a new feature instead of extending
tuplesort? Can't we unit them now?

Regards,

--
Hitoshi Harada

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-15 19:19:32 Re: Why we have tuplestore and tuplesort?
Previous Message Emanuel Calvo Franco 2009-08-15 18:25:50 Re: uuid contrib don't compile in OpenSolaris