Re: planner with index scan cost way off actual cost, advices to tweak cost constants?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux