Query rewrite does not work on Materialized View
I created a few materialized views containing only joins. The views are created with refresh force on demand and enable query rewrite. In init.ora, query_rewrite_enable = true and query_rewrite_integrity = trusted. After the materialized view created, I analyzed it. Then, I check the explain plan for the same query I created the materialized view to see if it's using the mv. But I don't see mv in the path. I ran the same query I used to create the mv. It took about the same time as I created the mv.
It seems to me the mv does not work as it suppose to be. Am I missing anything?
It's hard to comment without details. Try using dbms_mview.explain_rewrite to diagnose.
Check this out. It provides examples and criteria for query rewrites.
Last edited by Axr2; 05-15-2005 at 02:47 AM.
Also try using the query rewrite hint to see if you can prod it into rewriting.
Click Here to Expand Forum to Full Width