mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +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:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: plancat.h,v 1.28 2003/01/28 22:13:41 tgl Exp $
|
||||
* $Id: plancat.h,v 1.29 2003/02/03 15:07:08 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,10 +17,7 @@
|
||||
#include "nodes/relation.h"
|
||||
|
||||
|
||||
extern void get_relation_info(Oid relationObjectId,
|
||||
bool *hasindex, long *pages, double *tuples);
|
||||
|
||||
extern List *find_secondary_indexes(Oid relationObjectId);
|
||||
extern void get_relation_info(Oid relationObjectId, RelOptInfo *rel);
|
||||
|
||||
extern List *find_inheritance_children(Oid inhparent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user