Re: Proposal: partition pruning by secondary attributes

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Proposal: partition pruning by secondary attributes
Дата
Msg-id 20180208180138.5cjrgfgythjiurca@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Proposal: partition pruning by secondary attributes  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Proposal: partition pruning by secondary attributes
Список pgsql-hackers
On 2018-02-08 14:48:34 -0300, Alvaro Herrera wrote:
> Ildar Musin wrote:
> 
> > 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.
> 
> What is the problem with having a BRIN index?

Building plans to scan the individual partitions, lock them, open the
relevant files, etc is often going to be significantly more expensive
than pruning at plan time.

But there also seems to be a number of fairly nasty locking issues with
this proposal, leaving the amount of required code aside.

Greetings,

Andres Freund


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning
Следующее
От: Rafal Pietrak
Дата:
Сообщение: Re: it's a feature, but it feels like a bug