From the course: Advanced SQL for Query Tuning and Performance Optimization

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Materialized views

Materialized views

- [Instructor] Materialized views combine some of the features of tables and views. Materialized views are used to store the results of pre-computed queries. For example, we may have to perform expensive joins and we want to minimize the number of times we need to run that query. By materializing or storing the results of a query, the query results can be used for other operations without performing an expensive query operation again. While materialized views can save time, they will also take up space. Materialized views duplicate data that is already stored in tables. Data in materialized views can change state, so we'll have to update or refresh materialized views to capture changes to the sources of those materialized views. This means there is a potential for inconsistencies between source tables and materialized views. If you can tolerate these potential problems, the materialized views can help reduce the time…

Contents