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-20 15:58:33
Message-ID: 8410.1334937513@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.

> I haev to disagree about users noticing this and complaining about it
> too, to be honest, that strikes me as very unlikely.. For starters,
> they'd have to be debugging the planner sufficiently to see that there
> are two nearly-identical plans under consideration and that we picked
> one over the other based on which came first..

Yeah, I'm pretty dubious about that too. If there is really a reason
to care which one gets picked, it must be that the actual difference in
cost is much more than 1%. In which case, the appropriate fix is in the
cost estimates, not in the details of how add_path resolves near-ties.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-04-20 17:18:50 Re: Plan stability versus near-exact ties in cost estimates
Previous Message Tom Lane 2012-04-20 15:49:02 Re: Plan stability versus near-exact ties in cost estimates