pgsql: Fix compare_fuzzy_path_costs() to behave a bit more sanely.

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix compare_fuzzy_path_costs() to behave a bit more sanely.
Date: 2005-07-22 19:12:34
Message-ID: 20050722191234.C90B6528FA@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
pgsql/src/backend/optimizer/util:
pathnode.c (r1.111.4.1 -> r1.111.4.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c.diff?r1=1.111.4.1&r2=1.111.4.2)
pgsql/src/test/regress/expected:
geometry.out (r1.20 -> r1.20.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry.out.diff?r1=1.20&r2=1.20.4.1)
geometry_1.out (r1.5 -> r1.5.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_1.out.diff?r1=1.5&r2=1.5.4.1)
geometry_2.out (r1.2 -> r1.2.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_2.out.diff?r1=1.2&r2=1.2.4.1)
join.out (r1.22.4.1 -> r1.22.4.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join.out.diff?r1=1.22.4.1&r2=1.22.4.2)
join_1.out (r1.3.2.1 -> r1.3.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join_1.out.diff?r1=1.3.2.1&r2=1.3.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message User Llonergan 2005-07-22 19:30:50 bizgres - bizgres: Updated with JasperSoft
Previous Message Tom Lane 2005-07-22 19:12:02 pgsql: Fix compare_fuzzy_path_costs() to behave a bit more sanely.