Re: Horribly slow hash join

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Horribly slow hash join
Дата
Msg-id 878ygu8auw.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Horribly slow hash join  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Horribly slow hash join  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Tom Lane <tgl@sss.pgh.pa.us> writes:

> We could change the hash function, perhaps, but then we'd just have
> different cases where there's a problem ... hashing will always fail on
> *some* set of inputs.

Sure, but completely ignoring part of the input seems like an unfortunate
choice of hash function.

> (Also, I have been harboring some notions of supporting cross-type hash
> joins for integer types, which will not work unless small int8 values hash
> the same as int4 etc.)

The obvious way to modify the hash function is to xor the high 32 bits with
the low 32 bits. That maintains the property you need and at least ensures
that all the bits are taken into account.

--
greg

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

Предыдущее
От: Marcos Martínez(R)
Дата:
Сообщение: Re: Horribly slow hash join
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: Poor performance of group by query