• Tom Lane's avatar
    Improve ExecStoreTuple to be smarter about replacing the contents of · dab52ab1
    Tom Lane authored
    a TupleTableSlot: instead of calling ExecClearTuple, inline the needed
    operations, so that we can avoid redundant steps.  In particular, when
    the old and new tuples are both on the same disk page, avoid releasing
    and re-acquiring the buffer pin --- this saves work in both the bufmgr
    and ResourceOwner modules.  To make this improvement actually useful,
    partially revert a change I made on 2004-04-21 that caused SeqNext
    et al to call ExecClearTuple before ExecStoreTuple.  The motivation
    for that, to avoid grabbing the BufMgrLock separately for releasing
    the old buffer and grabbing the new one, no longer applies.  My
    profiling says that this saves about 5% of the CPU time for an
    all-in-memory seqscan.
    dab52ab1
nodeIndexscan.c 18.2 KB