Re: Plan stability versus near-exact ties in cost estimates - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Plan stability versus near-exact ties in cost estimates
Date
Msg-id 16786.1334984147@sss.pgh.pa.us
Whole thread Raw
In response to Re: Plan stability versus near-exact ties in cost estimates  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: RANGE type, and its subtype parameter
Next
From: Qi Huang
Date:
Subject: Re: Gsoc2012 idea, tablesample