Proposal: partition pruning by secondary attributes

Поиск
Список
Период
Сортировка
От Ildar Musin
Тема Proposal: partition pruning by secondary attributes
Дата
Msg-id 5fd17d8a-d64e-e5b2-3fd8-a99062974486@postgrespro.ru
обсуждение исходный текст
Ответы Re: Proposal: partition pruning by secondary attributes
Re: Proposal: partition pruning by secondary attributes
Список pgsql-hackers
Hello, hackers!

Sorry if this have already been discussed. I've had this idea some time
ago and then successfully forgot about it until pgconf.ru, where I had a
conversation with one of postgres users. His situation could be
described as this: they have a table with id, timestamp and some other
attributes, which is partitioned by (let's say) timestamp column. In
different contexts they may want to filter the table either by id or by
timestamp attribute (but not both). In this case pruning will only work
for timestamp column.

The idea is to store min and max values of secondary attributes (like
'id' in the example above) for each partition somewhere in catalog and
use it for partition pruning along with partitioning key. You can think
of it as somewhat like BRIN index but for partitions. And it will have
similar limitations. For example, we may benefit if secondary attribute
values are monotonically increase or decrease, but would be unhelpful if
they are scattered, or if table wasn't partitioned by range.

I wanted to ask community's opinion would it be worth considering.
Thanks!

-- 
Ildar Musin
i.musin@postgrespro.ru


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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: non-bulk inserts and tuple routing
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: In logical replication concurrent update of partition key createsa duplicate record on standby.