Re: [HACKERS] CTE inlining

Поиск
Список
Период
Сортировка
От Adam Brusselback
Тема Re: [HACKERS] CTE inlining
Дата
Msg-id CAMjNa7dvpNKmXCmKzsvBCuw03muyE2FCTZqtj2qZBE3ynrk96w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] CTE inlining  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
From a user's perspective:

>I think most people prefer #2 because:

>*  most users writing queries prefer #2
>*  most users assume full optimization and it seems natural to turn
>   _off_ an optimization via a keyword
>*  while some queries can be inlined, all queries can be materialized,
>   so doing #1 means INLINE would be only a preference, which could be
>   confusing

I completely agree with this reasoning.  I have a few queries I would have to touch to add "MATERIALIZED", but the vast majority of CTE's in my codebase would get a speedup. It would allow usage of CTE's more freely than now.  I currently avoid them unless it really simplifies a query because of the optimization fence.

Not that my opinion holds any weight, but the extra keyword for enabling the optimization fence is my preference.  By default trying to optimize more is a good thing IMO.

>Anyway, I am very glad we are considering addressing this in PG 11.

Seconded, this is a sore spot for me when using Postgres, and i'd love to not have it be an issue any more.

Thanks,
-Adam

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] postgres 9.6.2 update breakage
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: [HACKERS] Event triggers + table partitioning cause server crash in current master