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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers