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

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: planner with index scan cost way off actual cost, advices to tweak cost constants?
Date: 2006-03-21 13:30:22
Message-ID: 8764m8kjrl.fsf@meuh.mnc.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2006-03-21 14:03:20 Re: Perfomance test figures
Previous Message Guillaume Cottenceau 2006-03-21 13:03:19 Re: planner with index scan cost way off actual cost,