1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-26 12:21:12 +03:00

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%.
This commit is contained in:
Tom Lane
2003-02-03 15:07:08 +00:00
parent 0d3e36b668
commit 4cff59d8d5
12 changed files with 476 additions and 230 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: executor.h,v 1.87 2003/01/12 04:03:34 tgl Exp $
* $Id: executor.h,v 1.88 2003/02/03 15:07:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -137,6 +137,7 @@ extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo,
typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);
extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd);
extern void ExecAssignScanProjectionInfo(ScanState *node);
/*
* prototypes from functions in execTuples.c