Last Updated: January 10, 2026
The previous chapter explored denormalization, where you manually duplicate and maintain data for read performance. It works, but keeping data synchronized is tedious and error-prone.
What if the database could handle the synchronization for you?
Materialized views are database-managed denormalized tables. You define a query once, and the database stores the results as a table. When underlying data changes, the database (or you, on a schedule) refreshes the view.
Instead of running expensive queries every time, you read from a table that already has the answer. The database handles keeping it updated.