OSDN Git Service

Fix an error in make_outerjoininfo introduced by my patch of 30-Aug: the code
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 24 Oct 2007 20:54:27 +0000 (20:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 24 Oct 2007 20:54:27 +0000 (20:54 +0000)
commit3ef18797b83b9b274218009802a5994b7f41c818
treee526cbcae6b6d826f2eb21f9f71b3df178fdde50
parent5c4249c3538abb687c26ddba7aedbab38c95f2ef
Fix an error in make_outerjoininfo introduced by my patch of 30-Aug: the code
neglected to test whether an outer join's join-condition actually refers to
the lower outer join it is looking at.  (The comment correctly described what
was supposed to happen, but the code didn't do it...)  This often resulted in
adding an unnecessary constraint on the join order of the two outer joins,
which was bad enough.  However, it also seems to expose a performance
problem in an older patch (from 15-Feb): once we've decided that there is a
join ordering constraint, we will start trying clauseless joins between every
combination of rels within the constraint, which pointlessly eats up lots of
time and space if there are numerous rels below the outer join.  That probably
needs to be revisited :-(.  Per gripe from Jakub Ouhrabka.
src/backend/optimizer/plan/initsplan.c