初始化参数
Query_rewrite_enabled=true
Query_rewrite_integrity=trusted授予query rewrite 权限 
grant query rewrite to user_Name

解决方案 »

  1.   

    Materialized Views are typically used in warehouses to increase the speed of queries on very large databases. Queries often involve joins between tables and/or agregations such as SUM. The fact of building a Materialized View containing a table join and/or agregates, allows the optimizer to perform query rewrite operations that improve speed of the query as a result of use the Materialized View instead of perform expensive join operations. Remember that all the join operations and/or aggregations are precalculated at the Materialized View create time.