Re: HyperLogLog.c and pg_leftmost_one_pos32()

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: HyperLogLog.c and pg_leftmost_one_pos32()
Дата
Msg-id 20200730171619.3mtqgqg2z6lhmljo@development
обсуждение исходный текст
Ответ на Re: HyperLogLog.c and pg_leftmost_one_pos32()  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: HyperLogLog.c and pg_leftmost_one_pos32()  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Thu, Jul 30, 2020 at 09:21:23AM -0700, Jeff Davis wrote:
>On Wed, 2020-07-29 at 17:32 -0700, Peter Geoghegan wrote:
>> How did you test this? What kind of difference are we talking about?
>
>Essentially:
>  initHyperLogLog(&hll, 5)
>  for i in 0 .. one billion
>    addHyperLogLog(&hll, hash(i))
>  estimateHyperLogLog
>
>The numbers are the same regardless of bwidth.
>
>Before my patch, it takes about 15.6s. After my patch, it takes about
>6.6s, so it's more than a 2X speedup (including the hash calculation).
>

Wow. That's a huge improvements.

How does the whole test (data + query) look like? Is it particularly
rare / special case, or something reasonable to expect in practice?

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: HyperLogLog.c and pg_leftmost_one_pos32()
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PG 13 release notes, first draft