Tweak planner and executor to avoid doing ExecProject() in table scan

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 4cff59d8d540c441fb0c22dfaa517bc25aa5f794
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2003-02-03T15:07:08Z
Releases: 7.4.1
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%.

Files