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:02 |
Message-ID: | 20050722191202.0A8EA5290D@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.
Modified Files:
--------------
pgsql/src/backend/optimizer/util:
pathnode.c (r1.123 -> r1.124)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c.diff?r1=1.123&r2=1.124)
pgsql/src/test/regress/expected:
geometry.out (r1.20 -> r1.21)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry.out.diff?r1=1.20&r2=1.21)
geometry_1.out (r1.5 -> r1.6)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_1.out.diff?r1=1.5&r2=1.6)
geometry_2.out (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_2.out.diff?r1=1.2&r2=1.3)
join.out (r1.24 -> r1.25)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join.out.diff?r1=1.24&r2=1.25)
join_1.out (r1.5 -> r1.6)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join_1.out.diff?r1=1.5&r2=1.6)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-07-22 19:12:34 | pgsql: Fix compare_fuzzy_path_costs() to behave a bit more sanely. |
Previous Message | Bruce Momjian | 2005-07-22 19:00:56 | pgsql: More removal of unneeded parentheses. |