"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