Re: Combining hash values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Combining hash values
Дата
Msg-id 6883.1470065235@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Combining hash values  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: Combining hash values  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On that subject, while looking at hashfunc.c, I spotted that
> hashint8() has a very obvious deficiency, which causes disastrous
> performance with certain inputs:

Well, if you're trying to squeeze 64 bits into a 32-bit result, there
are always going to be collisions somewhere.

> I'd suggest using hash_uint32() for values that fit in a 32-bit
> integer and hash_any() otherwise.

Perhaps, but this'd break existing hash indexes.  That might not be
a fatal objection, but if we're going to put users through that
I'd like to think a little bigger in terms of the benefits we get.
I've thought for some time that we needed to move to 64-bit hash function
results, because the size of problem that's reasonable to use a hash join
or hash aggregation for keeps increasing.  Maybe we should do that and fix
hashint8 as a side effect.
        regards, tom lane



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: PostgreSQL 10 kick-off
Следующее
От: Tom Lane
Дата:
Сообщение: New version numbering practices