Re: CTE Materialization

Поиск
Список
Период
Сортировка
От Paul van der Linden
Тема Re: CTE Materialization
Дата
Msg-id CAEC-EqAOpz9w9PFwJ9HpSAUgfffX9K64LGLNZkqzacSP__-J2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CTE Materialization  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Thanks a lot, completely forgot that one!
Gonna test that tomorrow...

On Thu, Dec 2, 2021 at 11:34 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thursday, December 2, 2021, Paul van der Linden <paul.doskabouter@gmail.com> wrote:
Hi,

when switching to postgres 14 (from 11) I'm having some slow queries because of inlining of CTE's.
I know I can get the same result as with PG11 when adding MATERIALIZED to the cte, but the same application also needs to be able to run on older postgres versions, so that is a no-go.
Is there any other way that I can have materialized cte's in PG14 while still be compatible with older PG versions?
Much appreciated,

The usual anti-inlining hack is to add an “offset 0” to the query.  Haven’t tried it in 14 myself though.

David J.
 

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: CTE Materialization
Следующее
От: James Sewell
Дата:
Сообщение: Re: Max connections reached without max connections reached