Re: pull_up_subqueries question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pull_up_subqueries question
Дата
Msg-id 5687.1073055217@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pull_up_subqueries question  (Dennis Haney <davh@diku.dk>)
Список pgsql-general
Dennis Haney <davh@diku.dk> writes:
> I was looking at pull_up_subqueries
> (backend/optimizer/prep/prepjointree.c 135) and I was wondering why the
> recursive optimization is only done on subqueries that can be optimized.

Because it will be done when the subquery is planned (via recursion to
subquery_planner), if the subquery is left as a separate subquery.
The only reason pull_up_subqueries has to do this at all is that it has
already been done to the rest of the upper query, and so we would miss
doing it to the pulled-up part of the tree if we didn't do it here.
Compare the order of operations in subquery_planner.

            regards, tom lane

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Mnogosearch (Was: Re: website doc search is ... )
Следующее
От: Bruce Momjian
Дата:
Сообщение: postgresql.org server problems