mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +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:
@ -22,7 +22,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.136 2007/01/20 20:45:39 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.137 2007/01/22 20:00:39 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1197,6 +1197,9 @@ adjust_appendrel_attrs_mutator(Node *node, AppendRelInfo *context)
|
||||
newinfo->this_selec = -1;
|
||||
newinfo->left_ec = NULL;
|
||||
newinfo->right_ec = NULL;
|
||||
newinfo->left_em = NULL;
|
||||
newinfo->right_em = NULL;
|
||||
newinfo->scansel_cache = NIL;
|
||||
newinfo->left_bucketsize = -1;
|
||||
newinfo->right_bucketsize = -1;
|
||||
|
||||
|
Reference in New Issue
Block a user