Skip site navigation (1) Skip section navigation (2)

pgsql: Change have_join_order_restriction() so that we do not force a

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change have_join_order_restriction() so that we do not force a
Date: 2007-10-26 18:10:50
Message-ID: 20071026181050.4B299754229@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Change have_join_order_restriction() so that we do not force a clauseless join
if either of the input relations can legally be joined to any other rels using
join clauses.  This avoids uselessly (and expensively) considering a lot of
really stupid join paths when there is a join restriction with a large
footprint, that is, lots of relations inside its LHS or RHS.  My patch of
15-Feb-2007 had been causing the code to consider joining *every* combination
of rels inside such a group, which is exponentially bad :-(.  With this
behavior, clauseless bushy joins will be done if necessary, but they'll be
put off as long as possible.  Per report from Jakub Ouhrabka.

Backpatch to 8.2.  We might someday want to backpatch to 8.1 as well, but 8.1
does not have the problem for OUTER JOIN nests, only for IN-clauses, so it's
not clear anyone's very likely to hit it in practice; and the current patch
doesn't apply cleanly to 8.1.

Modified Files:
--------------
    pgsql/src/backend/optimizer:
        README (r1.40 -> r1.41)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/README?r1=1.40&r2=1.41)
    pgsql/src/backend/optimizer/path:
        joinrels.c (r1.87 -> r1.88)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinrels.c?r1=1.87&r2=1.88)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-10-26 18:10:58
Subject: pgsql: Change have_join_order_restriction() so that we do not force a
Previous:From: User MkzDate: 2007-10-26 15:14:11
Subject: pgbouncer - pgbouncer: simpler warning args

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group