Using Apache Hive
Also available as:
PDF

Using materialized views

Apache Hive works with Apache Calcite to 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 or Druid. 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.