]> granicus.if.org Git - postgresql/commit
Improve tuplesort.c to support variable merge order. The original coding
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 19 Feb 2006 05:54:06 +0000 (05:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 19 Feb 2006 05:54:06 +0000 (05:54 +0000)
commitdf700e6b40195d28dc764e0c694ac8cef90d4638
tree422c45bed536dbfba7141aff82af7ca767aa0627
parent85c0eac1afd92201638a4af6ab6e936f47727551
Improve tuplesort.c to support variable merge order.  The original coding
with fixed merge order (fixed number of "tapes") was based on obsolete
assumptions, namely that tape drives are expensive.  Since our "tapes"
are really just a couple of buffers, we can have a lot of them given
adequate workspace.  This allows reduction of the number of merge passes
with consequent savings of I/O during large sorts.

Simon Riggs with some rework by Tom Lane
src/backend/optimizer/path/costsize.c
src/backend/utils/sort/tuplesort.c
src/include/utils/tuplesort.h