Query rewrite options for materialized view.

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.
sakthikumarAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ThommyConnect With a Mentor Commented:
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
 
slightwv (䄆 Netminder) Commented:
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
 
manzoor_dbaCommented:
Hi,

Hope the below will help..

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

Thanks..
0
 
AnandCommented:
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
All Courses

From novice to tech pro — start learning today.