Re: planner with index scan cost way off actual cost, advices to tweak cost constants? - Mailing list pgsql-performance

From Guillaume Cottenceau
Subject Re: planner with index scan cost way off actual cost, advices to tweak cost constants?
Date
Msg-id 8764m8kjrl.fsf@meuh.mnc.lan
Whole thread Raw
In response to Re: planner with index scan cost way off actual cost, advices to tweak cost constants?  ("Jim C. Nasby" <jnasby@pervasive.com>)
Responses Re: planner with index scan cost way off actual cost, advices to tweak cost constants?
List pgsql-performance
"Jim C. Nasby" <jnasby 'at' pervasive.com> writes:

> If you feel like running some tests, you need to change
>
>     run_cost += max_IO_cost + csquared * (min_IO_cost - max_IO_cost);
>
> in src/backend/optimizer/path/costsize.c to something like
>
>     run_cost += max_IO_cost + abs(indexCorrelation) * (min_IO_cost - max_IO_cost);

Short after the beginning of a discussion about planner
associating too high cost for index scan, I'm suggested to change
source-code.. I'm already frightened about the near future :)

> That might not produce a perfect cost estimate, but I'll wager that it
> will be substantially better than what's in there now. FYI, see also
> http://archives.postgresql.org/pgsql-performance/2005-04/msg00669.php

Sad that Tom didn't share his thoughts about your cost algorithm
question in this message.

--
Guillaume Cottenceau

pgsql-performance by date:

Previous
From: Guillaume Cottenceau
Date:
Subject: Re: planner with index scan cost way off actual cost,
Next
From: "Merlin Moncure"
Date:
Subject: Re: Perfomance test figures