Solved

Query rewrite options for materialized view.

Posted on 2010-11-23
4
928 Views
Last Modified: 2012-05-10
How we can use materialized view for performance by enabling query rewrite?

My doubt is materialized view may not contain recent data, and whenever we write a query that matches m.view, there is no guarantee it will contain recent records.
0
Comment
Question by:sakthikumar
4 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34197512
If the MV is refreshed on commit it does contain recent records.

The problem here is that your transactions must wait for the MV to refresh before they return

As far as query rewrite, I suggest the online docs or the Internet.  There are a lot of papers out there on it.
0
 
LVL 5

Expert Comment

by:manzoor_dba
ID: 34197990
Hi,

Hope the below will help..

http://smahamed.blogspot.com/2010/11/materialized-views.html

Thanks..
0
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 34205738
Please see ORACLE documentation for Query Rewrite...

Basic Query Rewrite
http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/qrbasic.htm

Advanced Query Rewrite
http://download.oracle.com/docs/cd/B28359_01/server.111/b28313/qradv.htm

0
 
LVL 5

Expert Comment

by:anand_20703
ID: 34273572
Using the refresh on commit option in the MV could cause performance overhead. Avoid it and refresh the MV manually before you query the MV for reporting purposes. This approach is suitable in weekly/monthly reporting purposes using the MV and gives guarantee to you with latest data in MV.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Space Delimited Sql File 4 70
percentage remaining 6 40
Pfile and SPfile - Oracle 2 35
dates - loop 12 41
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now