Re: Making Vars outer-join aware

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Making Vars outer-join aware
Дата
Msg-id CAMbWs4_va6UWcaiPSZpeRPFzpA=UKU+4zKkxqdfrcKoKA5nKWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Making Vars outer-join aware  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Making Vars outer-join aware  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On Tue, Jul 12, 2022 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Richard Guo <guofenglinux@gmail.com> writes:
> Note that the evaluation of expression 'b.j + 1' now occurs below the
> outer join. Is this something we need to be concerned about?

It seems more formally correct to me, but perhaps somebody would
complain about possibly-useless expression evals.  We could likely
re-complicate the logic that inserts PHVs during pullup so that it
looks for Vars it can apply the nullingrels to.  Maybe there's an
opportunity to share code with flatten_join_alias_vars?

Yeah, maybe we can extend and leverage the codes in
adjust_standard_join_alias_expression() to do that?

But I'm not sure which is better, to evaluate the expression below or
above the outer join. It seems to me that if the size of base rel is
large and somehow the size of the joinrel is small, evaluation above the
outer join would win. And in the opposite case evaluation below the
outer join would be better.

Thanks
Richard 

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

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: Refactor to make use of a common function for GetSubscriptionRelations and GetSubscriptionNotReadyRelations.
Следующее
От: Amit Langote
Дата:
Сообщение: Re: ExecRTCheckPerms() and many prunable partitions