• Tom Lane's avatar
    Change have_join_order_restriction() so that we do not force a clauseless join · cd2a2ce9
    Tom Lane authored
    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.
    cd2a2ce9
README 31.8 KB