From a31ad27fc5dc32a1453233575b3cf7b5c34cf515 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 9 Jun 2005 04:19:00 +0000 Subject: Simplify the planner's join clause management by storing join clauses of a relation in a flat 'joininfo' list. The former arrangement grouped the join clauses according to the set of unjoined relids used in each; however, profiling on test cases involving lots of joins proves that that data structure is a net loss. It takes more time to group the join clauses together than is saved by avoiding duplicate tests later. It doesn't help any that there are usually not more than one or two clauses per group ... --- src/backend/nodes/outfuncs.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/backend/nodes/outfuncs.c') diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 8310894e0c2..2be5e1d98f6 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.254 2005/06/06 04:13:35 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.255 2005/06/09 04:18:58 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -1227,6 +1227,7 @@ _outRestrictInfo(StringInfo str, RestrictInfo *node) WRITE_BOOL_FIELD(valid_everywhere); WRITE_BOOL_FIELD(can_join); WRITE_BITMAPSET_FIELD(clause_relids); + WRITE_BITMAPSET_FIELD(required_relids); WRITE_BITMAPSET_FIELD(left_relids); WRITE_BITMAPSET_FIELD(right_relids); WRITE_NODE_FIELD(orclause); @@ -1238,15 +1239,6 @@ _outRestrictInfo(StringInfo str, RestrictInfo *node) WRITE_OID_FIELD(hashjoinoperator); } -static void -_outJoinInfo(StringInfo str, JoinInfo *node) -{ - WRITE_NODE_TYPE("JOININFO"); - - WRITE_BITMAPSET_FIELD(unjoined_relids); - WRITE_NODE_FIELD(jinfo_restrictinfo); -} - static void _outInnerIndexscanInfo(StringInfo str, InnerIndexscanInfo *node) { @@ -1989,9 +1981,6 @@ _outNode(StringInfo str, void *obj) case T_RestrictInfo: _outRestrictInfo(str, obj); break; - case T_JoinInfo: - _outJoinInfo(str, obj); - break; case T_InnerIndexscanInfo: _outInnerIndexscanInfo(str, obj); break; -- cgit v1.2.3