mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Put back planner's ability to cache the results of mergejoinscansel(),
which I had removed in the first cut of the EquivalenceClass rewrite to simplify that patch a little. But it's still important --- in a four-way join problem mergejoinscansel() was eating about 40% of the planning time according to gprof. Also, improve the EquivalenceClass code to re-use join RestrictInfos rather than generating fresh ones for each join considered. This saves some memory space but more importantly improves the effectiveness of caching planning info in RestrictInfos.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/selfuncs.h,v 1.38 2007/01/05 22:19:59 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/selfuncs.h,v 1.39 2007/01/22 20:00:40 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -160,7 +160,7 @@ extern Selectivity rowcomparesel(PlannerInfo *root,
|
||||
int varRelid, JoinType jointype);
|
||||
|
||||
extern void mergejoinscansel(PlannerInfo *root, Node *clause,
|
||||
Oid opfamily, int strategy,
|
||||
Oid opfamily, int strategy, bool nulls_first,
|
||||
Selectivity *leftscan,
|
||||
Selectivity *rightscan);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user