aboutsummaryrefslogtreecommitdiff
path: root/src/include/optimizer/planmain.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-08-07 19:35:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-08-07 19:35:02 +0000
commitaf95d7aa63be1d03bad6070d090874d3dfa046e8 (patch)
tree8466da3dda219225c516bf87fc521b5ccc86f91c /src/include/optimizer/planmain.h
parent368df3042783778031ece2b8580324516cd42de1 (diff)
downloadpostgresql-af95d7aa63be1d03bad6070d090874d3dfa046e8.tar.gz
postgresql-af95d7aa63be1d03bad6070d090874d3dfa046e8.zip
Improve INTERSECT/EXCEPT hashing by realizing that we don't need to make any
hashtable entries for tuples that are found only in the second input: they can never contribute to the output. Furthermore, this implies that the planner should endeavor to put first the smaller (in number of groups) input relation for an INTERSECT. Implement that, and upgrade prepunion's estimation of the number of rows returned by setops so that there's some amount of sanity in the estimate of which one is smaller.
Diffstat (limited to 'src/include/optimizer/planmain.h')
-rw-r--r--src/include/optimizer/planmain.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h
index 616f0ea2ad0..0aa1d32f947 100644
--- a/src/include/optimizer/planmain.h
+++ b/src/include/optimizer/planmain.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.109 2008/08/07 03:04:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/optimizer/planmain.h,v 1.110 2008/08/07 19:35:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -62,8 +62,8 @@ extern Unique *make_unique(Plan *lefttree, List *distinctList);
extern Limit *make_limit(Plan *lefttree, Node *limitOffset, Node *limitCount,
int64 offset_est, int64 count_est);
extern SetOp *make_setop(SetOpCmd cmd, SetOpStrategy strategy, Plan *lefttree,
- List *distinctList, AttrNumber flagColIdx, long numGroups,
- double outputRows);
+ List *distinctList, AttrNumber flagColIdx, int firstFlag,
+ long numGroups, double outputRows);
extern Result *make_result(PlannerInfo *root, List *tlist,
Node *resconstantqual, Plan *subplan);
extern bool is_projection_capable_plan(Plan *plan);