Re: Plan stability versus near-exact ties in cost estimates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Plan stability versus near-exact ties in cost estimates
Date: 2012-04-21 04:55:47
Message-ID: 16786.1334984147@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
>> A variant idea would be to replace the exact cost comparison with a
>> second round of fuzzy cost comparison, but with a much tighter fuzz
>> factor, maybe 1e-6 instead of 0.01.

> Not impressed with this idea- the notion that our model is good enough
> to produce valid values out to that many digits is, well, unlikely.

While I remain convinced of the abstract truth of that position, I've
committed a patch that uses a second round of fuzzy comparison. It
turned out that simply removing the exact comparison as per my first
proposal resulted in a surprisingly large number of changes in the
regression test results; apparently, a lot more cases than we realized
have multiple plans with indistinguishable costs. I didn't feel like
going through and validating the test result changes, and besides that
this could have resulted in changes in behavior-in-the-field that people
would complain about.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Qi Huang 2012-04-21 06:28:52 Re: Gsoc2012 idea, tablesample
Previous Message Amit Kapila 2012-04-21 01:33:01 Re: RANGE type, and its subtype parameter