Manage query rewrites
You can use a Hive query to stop or start the optimizer from rewriting a query based on a materialized view. As administrator, you can globally enable or disable all query rewrites based on materialized views.
By default, the optimizer can rewrite a query based on a materialized view. If you want a query executed without regard to a materialized view, for example to measure the execution time difference, you can disable rewriting and then enable it again.