Frequently asked questions about materialized views

Answers to the most common questions regarding usage of materialized views.

Can materialized views be used in production environments?

Before using materialized views, be aware of the known limitations and test them against your application requirements to determine if materialized views are suitable for your environment.

After materialized views are deployed, regular maintenance repairs are required to ensure that base tables and views are consistent. Provided that limitations are validated against the application and best practices are observed, materialized views can be deployed in production environments.

Is manual denormalization better than using materialized views?

This choice depends on the use case and requirements. Ensuring consistency between views and tables in the face of complex failures and concurrent updates requires additional mechanisms (such as row locking, view repair, and paired view replication), which requires extra work. In practice, no guarantees are lost when using built-in materialized views versus manually denormalized tables.

One differentiator of doing manual denormalization versus using materialized views is when consistency is less important, or data is never updated or deleted. In these instances, write to multiple tables from the client rather than using materialized views.