Re: Partition by hash formula

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Partition by hash formula
Дата
Msg-id 228515d1e1204eda0844a05fbe0c0d7e10c34c87.camel@cybertec.at
обсуждение исходный текст
Ответ на Partition by hash formula  (Vlad Bokov <vlad@razum2um.me>)
Список pgsql-general
On Fri, 2020-03-20 at 12:50 +0300, Vlad Bokov wrote:
> recently I read
> https://blog.dbi-services.com/hash-partitioning-in-postgresql-11/
> and reproduced steps from the, which gave exact same count outcome,
> which made me think
> hashing is a pure function.
> 
> Examined the data I saw following distribution:
> dept_1: 1,14,39...; dept_2: 3,11,21...; dept_3: 16,18,25...
> 
> I also found commit 1aba8e651a introducing the feature, but I'm not too
> much into internals.
> I wonder, could somebody write that hashing formula in pseudo-code or
> point to specific place in the code, please?

Look for the int4hashfast, texthashfast and similar functions in
src/backend/utils/cache/catcache.c

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Wal receiver process listens to physical IP
Следующее
От: Ravi Krishna
Дата:
Сообщение: How to get RAISE INFO in JDBC