| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера