Re: Partial join

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partial join
Дата
Msg-id 5928.1564668894@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Partial join  (Richard Guo <riguo@pivotal.io>)
Ответы Re: Partial join  (Arne Roland <A.Roland@index.de>)
Re: Partial join  (Richard Guo <riguo@pivotal.io>)
Список pgsql-hackers
Richard Guo <riguo@pivotal.io> writes:
> For the third query,  a rough investigation shows that, the qual 'sl =
> 5' and 'sc.sl = sg.sl' will form an equivalence class and generate two
> implied equalities: 'sc.sl = 5' and 'sg.sl = 5', which can be pushed
> down to the base rels. One consequence of the deduction is when
> constructing restrict lists for the joinrel, we lose the original
> restrict 'sc.sl = sg.sl', and this would fail the check
> have_partkey_equi_join(), which checks if there exists an equi-join
> condition for each pair of partition keys. As a result, this joinrel
> would not be considered as an input to further partitionwise joins.

> We need to fix this.

Uh ... why?  The pushed-down restrictions should result in pruning
away any prunable partitions at the scan level, leaving nothing for
the partitionwise join code to do.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Avoid full GIN index scan when possible