What does the MATERIALIZED option do when creating a CTE in PostgreSQL 12+?

Advanced SQL Developer Hard

Advanced SQL Developer — Hard

What does the MATERIALIZED option do when creating a CTE in PostgreSQL 12+?

Key points

  • MATERIALIZED physically stores CTE result
  • Prevents optimizer from inlining
  • Improves performance by avoiding redundant computations

Ready to go further?

Related questions