From 4f06c688c7b4726ac9f5279d4a9f32408eec5356 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 22 Jan 2007 20:00:40 +0000 Subject: 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. --- src/include/utils/selfuncs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/utils/selfuncs.h') diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index 84549ca1d32..f0c6f20427c 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -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); -- cgit v1.2.3