1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Tweak writetup_heap/readtup_heap to avoid storing the tuple identity

and transaction visibility fields of tuples being sorted.  These are
always uninteresting in a tuple being sorted (if the fields were actually
selected, they'd have been pulled out into user columns beforehand).
This saves about 24 bytes per row being sorted, which is a useful savings
for any but the widest of sort rows.  Per recent discussion.
This commit is contained in:
Tom Lane
2006-05-23 21:37:59 +00:00
parent 672f0beb01
commit 7f52e0c50e
2 changed files with 90 additions and 19 deletions

View File

@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/tuplesort.h,v 1.19 2006/03/05 15:59:08 momjian Exp $
* $PostgreSQL: pgsql/src/include/utils/tuplesort.h,v 1.20 2006/05/23 21:37:59 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,7 +32,11 @@ typedef struct Tuplesortstate Tuplesortstate;
* We provide two different interfaces to what is essentially the same
* code: one for sorting HeapTuples and one for sorting IndexTuples.
* They differ primarily in the way that the sort key information is
* supplied.
* supplied. Also, tuplesort.c guarantees to preserve all the header
* fields of an IndexTuple, but when sorting HeapTuples only the user data
* is guaranteed preserved, not the "system columns" (tuple identity and
* transaction visibility info).
*
* Yet a third slightly different interface supports sorting bare Datums.
*/