diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-22 20:00:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-01-22 20:00:40 +0000 |
commit | 4f06c688c7b4726ac9f5279d4a9f32408eec5356 (patch) | |
tree | 6bf75e7cdf88035988d4bf414e56889ea00d87b1 /src/backend/nodes/copyfuncs.c | |
parent | 45e07369383ff1631dea76cae6d222c2f16ad70e (diff) |
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.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 7b003dc095c..1237dc7fe64 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.362 2007/01/20 20:45:38 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.363 2007/01/22 20:00:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1326,6 +1326,10 @@ _copyRestrictInfo(RestrictInfo *from) /* EquivalenceClasses are never copied, so shallow-copy the pointers */ COPY_SCALAR_FIELD(left_ec); COPY_SCALAR_FIELD(right_ec); + COPY_SCALAR_FIELD(left_em); + COPY_SCALAR_FIELD(right_em); + /* MergeScanSelCache isn't a Node, so hard to copy; just reset cache */ + newnode->scansel_cache = NIL; COPY_SCALAR_FIELD(outer_is_left); COPY_SCALAR_FIELD(hashjoinoperator); COPY_SCALAR_FIELD(left_bucketsize); |