Re: Hash support for arrays

Поиск
Список
Период
Сортировка
От Nicolas Barbier
Тема Re: Hash support for arrays
Дата
Msg-id AANLkTik+zqRBEYzy1X5p_6DnGA=V9BeMS=+HCg_hoSLE@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Hash support for arrays  (Kenneth Marshall <ktm@rice.edu>)
Ответы Re: Hash support for arrays  (Kenneth Marshall <ktm@rice.edu>)
Re: Hash support for arrays  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
2010/11/2 Kenneth Marshall <ktm@rice.edu>:

> Given that our hash implimentation mixes the input data well (It does.
> I tested it.) then a simple rotate-and-xor method is all that should
> be needed to maintain all of the needed information. The original
> hash function has done the heavy lifting in this case.

Even with the perfect hash function for the elements, certain
combinations of elements could still lead to massive collisions. E.g.,
if repeated values are typical in the input data we are talking about,
then the rotate-and-xor method would still lead to collisions between
any array of the same values of certain lengths, regardless of the
value. In Tom's implementation, as he mentioned before, those
problematical lengths would be multiples of 32 (e.g., an array of 32
1s would collide with an array of 32 2s would collide with an array of
32 3s, etc).

Nicolas


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

Предыдущее
От: Marc Cousin
Дата:
Сообщение: Re: [RFC][PATCH]: CRC32 is limiting at COPY/CTAS/INSERT ... SELECT + speeding it up
Следующее
От: Greg Stark
Дата:
Сообщение: Re: pgsql: Bootstrap WAL to begin at segment logid=0 logseg=1 (000000010000