Oracle Training Oracle Tips Oracle Forum Class Catalog Remote DBA Oracle Tuning Emergency 911 RAC Support Apps Support Analysis Design Implementation Oracle Support
SQL Tuning Security Oracle UNIX Oracle Linux Monitoring Remote support Remote plans Remote services Application Server Applications Oracle Forms Oracle Portal App Upgrades SQL Server Oracle Concepts Software Support Remote Support
Consulting Staff Consulting Prices Help Wanted!
Oracle Posters Oracle Books Oracle Scripts Ion Excel-DB
When using materialized views it is critical to properly enable query rewrite so that SQL is automatically transformed to use the materialized views instead of the base tables.
The following parameters are required to enable materialized view query rewrite:
optimizer_mode = choose, first_rows, or all_rows job_queue_interval = 3600 job_queue_processes = 1 query_rewrite_enabled = true query_rewrite_integrity = enforced compatible = 8.1.5.0.0 (or greater)
However, getting query rewrite working can be tricky, and you often need to create dimensions. The article the value of meta-data for enabling Query Rewrite, describes the technique of creating dimensions and including the dimension in the materialized view definition to allow query rewrite to function for a variety of related queries:
This article gives a very simple example of such a query rewrite operation and then continues to illustrate how providing some additional meta-data to the database - next to constraints and proper data-type definitions - in the form of Dimensions can make all the different to the Query Rewrite capabilities of the CBO.
Without materialized views you may see unnecessary repeating large-table full-table scans, as summaries are computed, over and over:
Here are my notes on materialized views query rewrite:
Materialized View Query Rewrite
Dynamically create complex objects with Oracle materialized views
Oracle tuning using materialized views
Oracle hidden optimizer parameters
Oracle DBMS_ADVISOR TUNE_MVIEW
Combine Relational And Multidimensional Data In A Single OLAP Cube
Oracle10g OLAP Query Equivalence - Oracle 10g
Oracle 10g materialized view advisor dbms_mview - Oracle10g
Data structure denormalization with Oracle
Oracle Using Function Based Indexes
Burleson is the American Team
Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals. Feel free to ask questions on our Oracle forum.
Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.
Errata? Oracle technology is changing and we strive to update our BC Oracle support information. If you find an error or have a suggestion for improving our content, we would appreciate your feedback. Just e-mail: and include the URL for the page.
Burleson Consulting The Oracle of Database Support Oracle Performance Tuning Remote DBA Services Copyright © 1996 - 2011 by Burleson Enterprises All rights reserved. Oracle © is the registered trademark of Oracle Corporation.
Burleson Consulting The Oracle of Database Support Oracle Performance Tuning
Oracle Performance Tuning
Remote DBA Services
Copyright © 1996 - 2011 by Burleson Enterprises
All rights reserved.
Oracle