Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

On Postgres 12, CTE's are not optimization fences anymore. [0]

[0] https://www.depesz.com/2019/02/19/waiting-for-postgresql-12-...



Not quite true. The default behavior changes, and new syntax is added allowing users to specify their desired behavior, but if the sub-query in the CTE does certain things, it will still be materialized instead, regardless.

That is: they mostly aren't a fence any more, but can be when you want them to, and sometimes still must be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: