Re: CTE materialized/not materialized

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CTE materialized/not materialized
Дата
Msg-id 704895.1606491302@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: CTE materialized/not materialized  ("Voillequin, Jean-Marc" <Jean-Marc.Voillequin@moodys.com>)
Ответы RE: CTE materialized/not materialized
Список pgsql-sql
"Voillequin, Jean-Marc" <Jean-Marc.Voillequin@moodys.com> writes:
> Let me rephrase.
> In the case the CTE can be inlined, why PG does not compute 2 plans (P1 with CTE inlined, P2 with CTE materialized)
andcompare them to choose the best? 

It would be excessively expensive (even for just one CTE, never mind
several) and it wouldn't fit into the planner's structure very well.
As noted in the comment Alvaro quoted, the point where we make these
decisions is pretty far upstream of having any concrete cost estimates.

            regards, tom lane



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

Предыдущее
От: "Voillequin, Jean-Marc"
Дата:
Сообщение: RE: CTE materialized/not materialized
Следующее
От: "Voillequin, Jean-Marc"
Дата:
Сообщение: RE: CTE materialized/not materialized