pgsql: Improve ExecStoreTuple to be smarter about replacing the contents - Mailing list pgsql-committers

From tgl@svr1.postgresql.org (Tom Lane)
Subject pgsql: Improve ExecStoreTuple to be smarter about replacing the contents
Date
Msg-id 20051125042448.ED9ABDBABE@svr1.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Improve ExecStoreTuple to be smarter about replacing the contents of
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.

Modified Files:
--------------
    pgsql/src/backend/executor:
        execTuples.c (r1.89 -> r1.90)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execTuples.c.diff?r1=1.89&r2=1.90)
        nodeBitmapHeapscan.c (r1.4 -> r1.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeBitmapHeapscan.c.diff?r1=1.4&r2=1.5)
        nodeIndexscan.c (r1.105 -> r1.106)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeIndexscan.c.diff?r1=1.105&r2=1.106)
        nodeSeqscan.c (r1.54 -> r1.55)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeSeqscan.c.diff?r1=1.54&r2=1.55)
        nodeTidscan.c (r1.43 -> r1.44)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeTidscan.c.diff?r1=1.43&r2=1.44)

pgsql-committers by date:

Previous
From: gsmet@pgfoundry.org (User Gsmet)
Date:
Subject: pgfouine - pgfouine: removed debug
Next
From: chriskl@pgfoundry.org (User Chriskl)
Date:
Subject: mysqlcompat - mysqlcompat: Add <=> null safe comparison.