Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group