Re: patternsel() and histogram_selectivity() and the hard cutoff of 100

Поиск
Список
Период
Сортировка
От Matteo Beccati
Тема Re: patternsel() and histogram_selectivity() and the hard cutoff of 100
Дата
Msg-id 47B15B91.2080104@beccati.com
обсуждение исходный текст
Ответ на Re: patternsel() and histogram_selectivity() and the hard cutoff of 100  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Hi Greg,

>> So I had a thought about how to soften the controversial hard cutoff of 100
>> for the use of the histogram selectivity. Instead of switching 100% one way or
>> the other between the two heuristics why not calculate both and combine them.
>> The larger the sample size from the histogram the more we can weight the
>> histogram calculation. The smaller the histogram size the more we weight the
>> heuristic.
>>
>> My first thought was to scale it linearly so we use 10% of the histogram
>> sample + 90% of the heuristic for default statistic sizes of 10 samples. That
>> degenerates to the status quo for 100 samples and up.
> 
> Incidentally I hacked up a patch to do this:

Sounds sensible to me, at least much more than a hardcoded magic number 
a few people know about...


Cheers

-- 
Matteo Beccati

Openads - http://www.openads.org


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

Предыдущее
От: "Brendan Jurd"
Дата:
Сообщение: Re: use of alias
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Patch review