Re: Performance degradation with CTEs, switching from PG 11 to PG 15

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: Performance degradation with CTEs, switching from PG 11 to PG 15
Дата
Msg-id 211a58a6-5741-a0a2-db97-0e79f75d9d4f@a-kretschmer.de
обсуждение исходный текст
Ответ на Performance degradation with CTEs, switching from PG 11 to PG 15  (Jean-Christophe Boggio <postgresql@thefreecat.org>)
Ответы Re: Performance degradation with CTEs, switching from PG 11 to PG 15  (Jean-Christophe Boggio <postgresql@thefreecat.org>)
Список pgsql-performance

Am 22.11.23 um 12:38 schrieb Jean-Christophe Boggio:
>
>
> Also, adding "materialized" to both "withcwrack" and "withcwrack0" 
> CTEs gets the result in acceptable timings (a few seconds). The 
> problem with this is that we have some clients with older versions of 
> PG and I guess blindly adding the "materialized" keyword will cause 
> errors.
>

yeah, prior to 11 CTEs are a optimizer barrier. You can try to rewrite 
the queries to not using CTEs - or upgrade. If i were you i would upgrade.


Regards, Andreas

-- 
Andreas Kretschmer - currently still (garden leave)
Technical Account Manager (TAM)
www.enterprisedb.com




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

Предыдущее
От: Jean-Christophe Boggio
Дата:
Сообщение: Re: Performance degradation with CTEs, switching from PG 11 to PG 15
Следующее
От: Jean-Christophe Boggio
Дата:
Сообщение: Re: Performance degradation with CTEs, switching from PG 11 to PG 15