DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Query rewrite does not work on Materialized View

  1. #1
    Join Date
    Jun 2000
    Posts
    315

    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?

    Thanks!

  2. #2
    Join Date
    Oct 2002
    Posts
    807
    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.

    http://download-west.oracle.com/docs...520/qr.htm#721
    Last edited by Axr2; 05-15-2005 at 01:47 AM.

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Also try using the query rewrite hint to see if you can prod it into rewriting.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width