diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-11-28 00:46:19 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-11-28 00:46:19 +0000 |
commit | 1a95f12702b4e535b5e26ed9c3fcd0b2a1b1a20f (patch) | |
tree | c56c54fce5968c874b21fb902c1090b486da4719 /src/backend/nodes/outfuncs.c | |
parent | fe83b975b2bdfa9b553872aa9a5dc959ca89a51f (diff) | |
download | postgresql-1a95f12702b4e535b5e26ed9c3fcd0b2a1b1a20f.tar.gz postgresql-1a95f12702b4e535b5e26ed9c3fcd0b2a1b1a20f.zip |
Eliminate a lot of list-management overhead within join_search_one_level
by adding a requirement that build_join_rel add new join RelOptInfos to the
appropriate list immediately at creation. Per report from Robert Haas,
the list_concat_unique_ptr() calls that this change eliminates were taking
the lion's share of the runtime in larger join problems. This doesn't do
anything to fix the fundamental combinatorial explosion in large join
problems, but it should push out the threshold of pain a bit further.
Note: because this changes the order in which joinrel lists are built,
it might result in changes in selected plans in cases where different
alternatives have exactly the same costs. There is one example in the
regression tests.
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r-- | src/backend/nodes/outfuncs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 4e1c96271a9..69096759504 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.372 2009/11/15 02:45:34 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.373 2009/11/28 00:46:18 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -1544,6 +1544,7 @@ _outPlannerInfo(StringInfo str, PlannerInfo *node) WRITE_NODE_FIELD(glob); WRITE_UINT_FIELD(query_level); WRITE_NODE_FIELD(join_rel_list); + WRITE_INT_FIELD(join_cur_level); WRITE_NODE_FIELD(resultRelations); WRITE_NODE_FIELD(init_plans); WRITE_NODE_FIELD(cte_plan_ids); |