Using materialized views

If your queries are of a repetitive nature, you can reduce latency and resource consumption by using materialized views. You can optimize your queries automatically using materialized views you create.

Using a materialized view, the optimizer can compare old and new tables, rewrite queries to accelerate processing, and manage maintenance of the materialized view when data updates occur. The optimizer can use a materialized view to fully or partially rewrite projections, filters, joins, and aggregations. Hive stores materialized views in the Hive warehouse. You can perform the following operations related to materialized views:

  • Create a materialized view of queries or subqueries
  • Drop a materialized view
  • Show materialized views
  • Describe a materialized view
  • Enable or disable query rewriting based on a materialized view
  • Globally enable or disable rewriting based on any materialized view
  • Use partitioning to improve the performance of materialized views.