Re: gistchoose vs. bloat

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: gistchoose vs. bloat
Дата
Msg-id 20121018180930.GI3763@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: gistchoose vs. bloat  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: gistchoose vs. bloat  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Alexander Korotkov escribió:

> > 4. It looks like the randomization is happening while trying to compare
> > the penalties. I think it may be more readable to separate those two
> > steps; e.g.
> >
> >   /* create a mapping whether randomization is on or not */
> >   for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i))
> >       offsets[i - FirstOffsetNumber] = i;
> >
> >   if (randomization)
> >       /* randomize offsets array */
> >
> >   for (i = 0; i < maxoff; i++)
> >   {
> >      offset = offsets[i];
> >      ...
> >   }
> >
> > That's just an idea; if you think it's more readable as-is (or if I am
> > misunderstanding) then let me know.
>
> Actually, current implementation comes from idea of creating possible less
> overhead when randomization is off. I'll try to measure overhead in worst
> case. If it is low enough then you proposal looks reasonable to me.

Were you able to do these measurements?  If not, I'll defer to your and
Jeff's judgement on what's the best next step here.

Jeff, do you think we need more review of this patch?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] lock_timeout and common SIGALRM framework
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Statistics and selectivity estimation for ranges