Re: Correlation in cost_index()

Поиск
Список
Период
Сортировка
От Manfred Koizar
Тема Re: Correlation in cost_index()
Дата
Msg-id gni7jv49el8hh6f0sq2ag5j7dadekj08gv@4ax.com
обсуждение исходный текст
Ответ на Re: Correlation in cost_index()  (Sean Chittenden <sean@chittenden.org>)
Список pgsql-hackers
On Thu, 7 Aug 2003 13:44:19 -0700, Sean Chittenden
<sean@chittenden.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 ;-)

ServusManfred


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: consistency check on SPI tuple count failed
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: consistency check on SPI tuple count failed