]> granicus.if.org Git - postgresql/commit
Tweak planner and executor to avoid doing ExecProject() in table scan
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 3 Feb 2003 15:07:08 +0000 (15:07 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 3 Feb 2003 15:07:08 +0000 (15:07 +0000)
commit4cff59d8d540c441fb0c22dfaa517bc25aa5f794
tree88b4c216d219582904d3d9d6a236bb9468fe148c
parent0d3e36b6687ae601551fb8047c10a68f2d6fb565
Tweak planner and executor to avoid doing ExecProject() in table scan
nodes where it's not really necessary.  In many cases where the scan node
is not the topmost plan node (eg, joins, aggregation), it's possible to
just return the table tuple directly instead of generating an intermediate
projection tuple.  In preliminary testing, this reduced the CPU time
needed for 'SELECT COUNT(*) FROM foo' by about 10%.
12 files changed:
src/backend/executor/execMain.c
src/backend/executor/execScan.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeTidscan.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/relnode.c
src/include/executor/executor.h
src/include/nodes/relation.h
src/include/optimizer/plancat.h