From 9a586fe0c5a9228cc60428207a3fb64fb392b848 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 6 Jun 2005 04:13:36 +0000 Subject: Nab some low-hanging fruit: replace the planner's base_rel_list and other_rel_list with a single array indexed by rangetable index. This reduces find_base_rel from O(N) to O(1) without any real penalty. While find_base_rel isn't one of the major bottlenecks in any profile I've seen so far, it was starting to creep up on the radar screen for complex queries --- so might as well fix it. --- src/backend/nodes/outfuncs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/nodes/outfuncs.c') diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 51a85a90b3..8310894e0c 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.253 2005/06/05 22:32:54 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.254 2005/06/06 04:13:35 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -1150,9 +1150,8 @@ _outPlannerInfo(StringInfo str, PlannerInfo *node) { WRITE_NODE_TYPE("PLANNERINFO"); + /* NB: this isn't a complete set of fields */ WRITE_NODE_FIELD(parse); - WRITE_NODE_FIELD(base_rel_list); - WRITE_NODE_FIELD(other_rel_list); WRITE_NODE_FIELD(join_rel_list); WRITE_NODE_FIELD(equi_key_list); WRITE_NODE_FIELD(in_info_list); -- cgit v1.2.1