Why we have tuplestore and tuplesort? - Mailing list pgsql-hackers

From Hitoshi Harada
Subject Why we have tuplestore and tuplesort?
Date
Msg-id e08cc0400908151151t5791a998t9314a02626ebdd94@mail.gmail.com
Whole thread Raw
Responses Re: Why we have tuplestore and tuplesort?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Emanuel Calvo Franco
Date:
Subject: Re: uuid contrib don't compile in OpenSolaris
Next
From: Tom Lane
Date:
Subject: Re: Why we have tuplestore and tuplesort?