• Tom Lane's avatar
    Avoid considering both sort directions as equally useful for merging. · 834ddc62
    Tom Lane authored
    This doubles the planning workload for mergejoins while not actually
    accomplishing much.  The only useful case is where one of the directions
    matches the query's ORDER BY request; therefore, put a thumb on the scales
    in that direction, and otherwise arbitrarily consider only the ASC direction.
    (This is a lot easier now than it would've been before 8.3, since we have
    more semantic knowledge embedded in PathKeys now.)
    834ddc62
pathkeys.c 42.5 KB