3 ms·
Yep! A lot of older posts about CTEs largely advice against them for this reason. Postgres 12 introduced controllable materialization behaviour: https://paquie
by brasetvik 5y ago
Yep! A lot of older posts about CTEs largely advice against them for this reason.
Postgres 12 introduced controllable materialization behaviour: https://paquier.xyz/postgresql-2/postgres-12-with-materialize/ https://paquier.xyz/postgresql-2/postgres-12-with-materializ...
By default, it'll _not_ materialise unless it's recursive, or if there are >1 other CTEs consuming it.
When not materializing, filters may push through the CTEs.