Re: General purpose hashing func in pgbench

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: General purpose hashing func in pgbench
Дата
Msg-id 9fe2a29e-ea38-4971-ade9-86161bd90ce9@manitou-mail.org
обсуждение исходный текст
Ответ на Re: General purpose hashing func in pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: General purpose hashing func in pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
    Fabien COELHO wrote:

> Most "permutation" functions are really cryptographic cyphers which are
> quite expensive, and require powers of two, which is not what is needed.
> ISTM that there are some constructs to deal with arbitrary sizes based on
> cryptographic functions, but that would make it too expensive for the
> purpose.

FWIW, you might have a look at the permuteseq extension:
  https://pgxn.org/dist/permuteseq
It permutes an arbitrary range of 64-bit integers into itself,
with a user-supplied key as the seed.
Outputs are coerced into the desired range by using the
smallest possible power of two for the Feistel cypher's
block size, and then cycle-walking over the results.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


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

Предыдущее
От: Arthur Zakirov
Дата:
Сообщение: Re: [HACKERS] Flexible configuration for full-text search
Следующее
От: Thomas Munro
Дата:
Сообщение: PathNameCreateTemporaryDir() vs concurrency