From: Guillaume Cottenceau <gc@mnc.ch>
To: Jim C. Nasby <jnasby@pervasive.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: planner with index scan cost way off actual cost, advices to tweak cost constants?
Date: 21 Mar 2006 14:30:22 +0100
Message-ID: <8764m8kjrl.fsf@meuh.mnc.lan> (raw)
In-Reply-To: <20060321115835.GN15742@pervasive.com>
References: <87ek11gz69.fsf@meuh.mnc.lan>
<1d4e0c10603180220se128a79r71534db9349bd746@mail.gmail.com>
<87hd5tmt1z.fsf@meuh.mnc.lan>
<20060321095700.GX15742@pervasive.com>
<87irq8kswd.fsf@meuh.mnc.lan>
<20060321115835.GN15742@pervasive.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gc@mnc.ch, jnasby@pervasive.com
Subject: Re: planner with index scan cost way off actual cost, advices to tweak cost constants?
In-Reply-To: <8764m8kjrl.fsf@meuh.mnc.lan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox