Re: BUG #17721: A completely unused CTE negatively affect Query Plan
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #17721: A completely unused CTE negatively affect Query Plan |
| Дата | |
| Msg-id | 2998993.1671058060@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #17721: A completely unused CTE negatively affect Query Plan (PG Bug reporting form <noreply@postgresql.org>) |
| Ответы |
Re: BUG #17721: A completely unused CTE negatively affect Query Plan
|
| Список | pgsql-bugs |
Nathaniel Hazelton <nathaniel@sturdyai.com> writes:
> The CTE in that location was emulating a view in which we have a CTE -
> which responds the same way. Does this mean CTEs can never be used in
> views that could be flattened without affecting performance?
You've got a view with an unused CTE? Why?
But at any rate, yes, the presence of a CTE is an optimization
fence: we can't flatten the subquery containing it without losing
the query level at which the CTE should be evaluated. Perhaps there
are special cases where that could be relaxed, but nobody's tried
very hard.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера