Re: Define hash partition for certain column values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Define hash partition for certain column values
Дата
Msg-id 820805.1610346968@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Define hash partition for certain column values  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-general
=?utf-8?B?0JPQvtC70YPQsdC10LLQsCDQr9C90LA=?= <ishsha@yandex.ru> writes:
> Hello,  I've found in source code that there is a function satisfies_hash_partition(oid, modulus, remainder,
column_values[])which allows to check if the certain column value will be placed in the certain partition. I' d like to
knowif there is an opportunity not to check the certain partition but to define which partition will be the certain
columnvalue placed in. 

If you want to control what goes where, use list partitioning (or,
perhaps, range partitioning).  Hash is only suitable if you do not
care which partition any particular row goes to.

Personally, I think hash partitioning is mostly academic, precisely
because of that.  If the partitioning doesn't line up with application
requirements, you give up too much of the benefit of using partitions.

            regards, tom lane



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

Предыдущее
От: raf
Дата:
Сообщение: Re: How to keep format of views source code as entered?
Следующее
От: Ron
Дата:
Сообщение: Re: Define hash partition for certain column values