pgsql: Eliminate a lot of list-management overhead within

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Eliminate a lot of list-management overhead within
Date: 2009-11-28 00:46:19
Message-ID: 20091128004619.79560753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/nodes:
outfuncs.c (r1.372 -> r1.373)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c?r1=1.372&r2=1.373)
pgsql/src/backend/optimizer/geqo:
geqo_eval.c (r1.90 -> r1.91)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/geqo/geqo_eval.c?r1=1.90&r2=1.91)
pgsql/src/backend/optimizer/path:
allpaths.c (r1.190 -> r1.191)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/allpaths.c?r1=1.190&r2=1.191)
joinrels.c (r1.102 -> r1.103)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinrels.c?r1=1.102&r2=1.103)
pgsql/src/backend/optimizer/plan:
planmain.c (r1.115 -> r1.116)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planmain.c?r1=1.115&r2=1.116)
pgsql/src/backend/optimizer/util:
relnode.c (r1.95 -> r1.96)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/relnode.c?r1=1.95&r2=1.96)
pgsql/src/include/nodes:
relation.h (r1.179 -> r1.180)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h?r1=1.179&r2=1.180)
pgsql/src/include/optimizer:
paths.h (r1.108 -> r1.109)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/paths.h?r1=1.108&r2=1.109)
pgsql/src/test/regress/expected:
join.out (r1.41 -> r1.42)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join.out?r1=1.41&r2=1.42)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-11-28 01:23:08 Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
Previous Message marcin mank 2009-11-28 00:33:21 Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a