From: | Manfred Koizar <mkoi-pg(at)aon(dot)at> |
---|---|
To: | Sean Chittenden <sean(at)chittenden(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Correlation in cost_index() |
Date: | 2003-08-08 16:31:19 |
Message-ID: | gni7jv49el8hh6f0sq2ag5j7dadekj08gv@4ax.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 7 Aug 2003 13:44:19 -0700, Sean Chittenden
<sean(at)chittenden(dot)org> wrote:
>> The indexCorrelation^2 algorithm was only a quick hack with no theory
>> behind it :-(. I've wanted to find some better method to put in there,
>> but have not had any time to research the problem.
>
>Could we "quick hack" it to a geometric mean instead since a mean
>seemed to yield better results than indexCorrelation^2?
Linear interpolation on (1-indexCorrelation)^2 (algorithm 3 in
http://members.aon.at/pivot/pg/16-correlation-732.diff) is almost as
good as geometric interpolation (algorithm 4 in the patch, proposal 3
in this thread), and its computation is much cheaper because it does
not call exp() and log(). Download
http://members.aon.at/pivot/pg/cost_index.sxc and play around with
your own numbers to get a feeling.
(1-indexCorrelation)^2 suffers from the same lack of theory behind it
as indexCorrelation^2. But the results look much more plausible.
Well, at least to me ;-)
Servus
Manfred
From | Date | Subject | |
---|---|---|---|
Next Message | Mendola Gaetano | 2003-08-08 16:33:29 | Re: consistency check on SPI tuple count failed |
Previous Message | Tom Lane | 2003-08-08 16:26:14 | Re: consistency check on SPI tuple count failed |