2 ms·
I think I read somewhere that they are fixing some of optimization issues for CTEs in the next release of Postgres. Does anyone know whether that's true or not?
by war1025 7y ago
I think I read somewhere that they are fixing some of optimization issues for CTEs in the next release of Postgres. Does anyone know whether that's true or not?
- rosser 7y agoAre you thinking of the "[NOT] MATERIALIZED" clause? Yes, that's coming. https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=608b167f9f9c4553c35bb1ec0eab9ddae643989b https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit...
- war1025 7y agoThanks for the info! I am a big fan of the readability of CTEs. Though I guess in production code we use SqlAlchemy, so it would just be a matter of swapping `.cte()` for `.subquery()` probably...
- ellisv 7y agoIIRC Postgres 12 is suppose to remove most of the optimization fences around CTEs.