Re: issue partition scan

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: issue partition scan
Дата
Msg-id 566EF81B-F9B2-4CD2-900E-5163732770FF@thebuild.com
обсуждение исходный текст
Ответ на Re: issue partition scan  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-performance

> On May 25, 2021, at 17:16, David Rowley <dgrowleyml@gmail.com> wrote:
>
> It's because of the OR condition.  If it was an AND condition then the
> planner wouldn't have to consider the fact that records in other
> partitions might be required for the join.

The OP might consider rewriting the query as a UNION, with each part of the top-lkevel OR being a branch of the UNION,
butexcluding the partitioned table from the JOINs for the branch of the UNION that doesn't appear to actually require
them.


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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: issue partition scan
Следующее
От: Eugen Konkov
Дата:
Сообщение: Count (select 1) subquery as constant