Re: gistchoose vs. bloat

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: gistchoose vs. bloat
Дата
Msg-id CAPpHfduz2QvqxbpTNbOJk6MOY_p551m1yQVFBAiFac1y1Du4EA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: gistchoose vs. bloat  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: gistchoose vs. bloat
Re: gistchoose vs. bloat
Список pgsql-hackers
On Mon, Aug 20, 2012 at 9:13 PM, Alexander Korotkov <aekorotkov@gmail.com> wrote:
Current gistchoose code has a bug. I've started separate thread about it.
Also, it obviously needs more comments.

Current state of patch is more proof of concept than something ready. I'm going to change it in following ways:
1) We don't know how expensive user penalty function is. So, I'm going to change randomization algorithm so that it doesn't increase number of penalty calls in average.
2) Since, randomization could produce additional IO, there are probably no optimal solution for all the cases. We could introduce user-visible option which enables or disables randomization. However, default value of this option is another question.
 
Also, I think you should use random() rather than rand().

Thanks, will fix. 

New version of patch is attached. Parameter "randomization" was introduced. It controls whether to randomize choose. Choose algorithm was rewritten.

------
With best regards,
Alexander Korotkov.
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_upgrade del/rmdir path fix
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_upgrade del/rmdir path fix