Re: Pulling up direct-correlated ANY_SUBLINK

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Pulling up direct-correlated ANY_SUBLINK
Дата
Msg-id 27733.1568123328@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Pulling up direct-correlated ANY_SUBLINK  (Richard Guo <riguo@pivotal.io>)
Ответы Re: Pulling up direct-correlated ANY_SUBLINK  (Antonin Houska <ah@cybertec.at>)
Re: Pulling up direct-correlated ANY_SUBLINK  (Richard Guo <riguo@pivotal.io>)
Re: Pulling up direct-correlated ANY_SUBLINK  (Richard Guo <guofenglinux@gmail.com>)
Re: Pulling up direct-correlated ANY_SUBLINK  (Andy Fan <zhihui.fan1213@gmail.com>)
Список pgsql-hackers
Richard Guo <riguo@pivotal.io> writes:
> Currently we do not try to pull up sub-select of type ANY_SUBLINK if it
> refers to any Vars of the parent query, as indicated in the code snippet
> below:
>     if (contain_vars_of_level((Node *) subselect, 1))
>         return NULL;
> Why do we have this check?

Because the result would not be a join between two independent tables.

> Can we try to pull up direct-correlated ANY SubLink with the help of
> LATERAL?

Perhaps.  But what's the argument that you'd end up with a better
plan?  LATERAL pretty much constrains things to use a nestloop,
so I'm not sure there's anything fundamentally different.

            regards, tom lane



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: accounting for memory used for BufFile during hash joins
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Move user options to the end of the command in pg_upgrade