Fix compare_fuzzy_path_costs() to behave a bit more sanely. The original
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 22 Jul 2005 19:12:02 +0000 (19:12 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 22 Jul 2005 19:12:02 +0000 (19:12 +0000)
commit37c443eefd3cac0778c915aaecdceda1a5e1d800
treeb43a0ab68dfb0af4160c3fba7f30fcc0f5a659e4
parent3758affc9b229e33f23a81053d65945183ef33e6
Fix compare_fuzzy_path_costs() to behave a bit more sanely.  The original
coding would ignore startup cost differences of less than 1% of the
estimated total cost; which was OK for normal planning but highly not OK
if a very small LIMIT was applied afterwards, so that startup cost becomes
the name of the game.  Instead, compare startup and total costs fuzzily
but independently.  This changes the plan selected for two queries in the
regression tests; adjust expected-output files for resulting changes in
row order.  Per reports from Dawid Kuroczko and Sam Mason.
src/backend/optimizer/util/pathnode.c
src/test/regress/expected/geometry.out
src/test/regress/expected/geometry_1.out
src/test/regress/expected/geometry_2.out
src/test/regress/expected/join.out
src/test/regress/expected/join_1.out