Here is the definition of relation_byte_size() in optimizer/path/costsize.c:

Bruce Momjian <bruce@momjian.us>

Commit: ed96bfde18293538761905b6b624b68424dd9d85
Author: Bruce Momjian <bruce@momjian.us>
Date: 2003-12-18T03:46:45Z
Releases: 8.0.0
Here is the definition of relation_byte_size() in optimizer/path/costsize.c:

----------------------------------------------------------------------
/*
 * relation_byte_size
 *        Estimate the storage space in bytes for a given number of tuples
 *        of a given width (size in bytes).
 */
static double
relation_byte_size(double tuples, int width)
{
        return tuples * (MAXALIGN(width) + MAXALIGN(sizeof(HeapTupleData)));
}

----------------------------------------------------------------------

Shouldn't this be HeapTupleHeaderData and not HeapTupleData ?

(Of course, from a costing perspective these shouldn't be very different but ...)

Sailesh Krishnamurthy

Files

PathChange+/−
src/backend/optimizer/path/costsize.c modified +2 −2