diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-21 21:01:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-04-21 21:01:45 +0000 |
commit | afcf09dd9034f24e34dd46f69938882ab5b103d2 (patch) | |
tree | 497edd9a542b2bc9312afe2f39341f7b95a892c5 /src/backend/optimizer/util/pathnode.c | |
parent | ac7e6c0665a377fb0e4e5b12cfc762c1b14e425e (diff) | |
download | postgresql-afcf09dd9034f24e34dd46f69938882ab5b103d2.tar.gz postgresql-afcf09dd9034f24e34dd46f69938882ab5b103d2.zip |
Some further performance tweaks for planning large inheritance trees that
are mostly excluded by constraints: do the CE test a bit earlier to save
some adjust_appendrel_attrs() work on excluded children, and arrange to
use array indexing rather than rt_fetch() to fetch RTEs in the main body
of the planner. The latter is something I'd wanted to do for awhile anyway,
but seeing list_nth_cell() as 35% of the runtime gets one's attention.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 81f7c99e963..6d440001d6b 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.138 2007/02/06 02:59:12 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.139 2007/04/21 21:01:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -800,7 +800,7 @@ create_unique_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath) */ if (sub_targetlist && rel->rtekind == RTE_SUBQUERY) { - RangeTblEntry *rte = rt_fetch(rel->relid, root->parse->rtable); + RangeTblEntry *rte = planner_rt_fetch(rel->relid, root); List *sub_tlist_colnos; sub_tlist_colnos = translate_sub_tlist(sub_targetlist, rel->relid); |