I was recently working on tuning – production environment, which had number of materialized views which were scheduled to complete refresh during off hours.

This complete refresh process was very time consuming, also producing a large amount archivelogs & undo.

Customer was complaining about sudden change in materialized view behavior, after they upgraded database from 9i to 11g.

After reading Oracle documentation about materialized views I found, the reason for this sudden behavior change.


From 10g, Oracle has changed the default parameter value of ATOMIC_REFRESH in the DBMS_MVIEW.REFRESH package.

In earlier releases (before 10g) the parameter was set to FALSE by default but now it is set to TRUE, which forces a DELETE of the materialized view instead of TRUNCATE, making the materialized view more “available” at refresh time.


Advantages of ATOMIC_REFRESH => FLASE

  • No or very less archive generation
  • Complete refresh process is very fast as compared to process with ATOMIC_REFRESH => TRUE

Disadvantages of ATOMIC_REFRESH => FLASE

  • Unavailability of data during the refresh process, which could be unacceptable to application and business user.

After discussing with customer, I made changes in refresh methodology so as to use ATOMIC_REFRESH => FLASE.


          Time Taken          Archive generation
Before    Approx. 43 minutes  Approx. 68 
After     Approx. 6 minutes   Approx. 7

Usage:

EXEC DBMS_MVIEW.REFRESH(‘MVIEW1’, METHOD => ‘C’, ATOMIC_REFRESH => FALSE);

Hope so this post is useful for you 🙂

Cheers

Regards,

Adityanath

Advertisements

89 responses to “Slow Materialized View Complete Refresh Issues Resolved….”

  1. ปั้มไลค์ Avatar

    Like!! Really appreciate you sharing this blog post.Really thank you! Keep writing.

  2. OllieOReeb Avatar
    OllieOReeb

    whoah this weblog is wonderful i love reading your articles.

    Stay up the great work! You understand, many individuals are hunting around
    for this information, you could help them greatly.

  3. Aida Nickoley Avatar
    Aida Nickoley

    I’m not that much of a online reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back later. All the best

  4. Jestine Kattan Avatar
    Jestine Kattan

    I believe this website has got some rattling wonderful info for everyone : D.

  5. Pilar Avatar
    Pilar

    Good post. I will be dealing with a few of these issues as well..

  6.  Avatar
    Anonymous

    It’s remarkable for me to have a web site, which is beneficial
    for my knowledge. thanks admin

    my blog :: zipper wallet insert for chic sparrow waypoint

  7. Antwan Avatar
    Antwan

    Wow! After all I got a website from where I can actually obtain valuable data
    concerning my study and knowledge.

  8. Wilbur Avatar
    Wilbur

    This piece of writing provides clear idea designed for the new users of blogging, that really how to do running a blog.

  9. Lien Avatar
    Lien

    Awesome issues here. I am very glad to look your article.
    Thanks so much and I’m having a look forward to touch you.
    Will you kindly drop me a e-mail?

  10. Issac Avatar
    Issac

    I blog quite often and I genuinely thank you for your content.
    This article has really peaked my interest. I am going to
    bookmark your site and keep checking for new information about once a week.
    I opted in for your RSS feed as well.

  11. Kaylee Avatar
    Kaylee

    Hi there, all is going sound here and ofcourse every one is sharing information, that’s in fact excellent, keep up writing.

  12. Fashion Styles Avatar

    Hi there, I found your blog via Google at the same time as looking for a related matter, your web site got here up, it appears to be like great. I’ve bookmarked it in my google bookmarks.

  13.  Avatar

    *Oh my goodness! an amazing article dude. Thank you However I am experiencing issue with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting identical rss problem? Anyone who knows kindly respond. Thnkx

  14.  Avatar
    Anonymous

    Very nice post. I simply stumbled upon your blog and wanted to say that I have truly enjoyed surfing around your weblog posts. In any case I will be subscribing on your feed and I’m hoping you write again very soon!

  15.  Avatar
    Anonymous

    Im obliged for the blog post.Really thank you! Great.

  16. honey Avatar
    honey

    Great post.Thanks Again. Cool.

  17.  Avatar
    Anonymous

    I loved your blog post.Thanks Again. Fantastic.

  18.  Avatar
    Anonymous

    Wow, great blog. Much obliged.

  19.  Avatar
    Anonymous

    Really appreciate you sharing this article post. Will read on…

  20.  Avatar
    Anonymous

    A big thank you for your article.Really thank you! Awesome.

  21.  Avatar
    Anonymous

    I think this is a real great article post.Much thanks again. Much obliged.

  22.  Avatar
    Anonymous

    Looking forward to reading more. Great article.Much thanks again. Cool.

  23.  Avatar
    Anonymous

    Very good blog article.Really looking forward to read more. Fantastic.

  24. 足球比分007 Avatar
    足球比分007

    Major thanks for the blog.Really looking forward to read more.

  25. deep wave hair extensions for braiding Avatar
    deep wave hair extensions for braiding

    Very informative post. Awesome.

  26. personal capital review Avatar
    personal capital review

    Awesome article.Really thank you! Will read on…

  27. slot gudang 138 Avatar
    slot gudang 138

    Major thanks for the blog.Really looking forward to read more. Keep writing.

  28. la plastics Avatar
    la plastics

    Very neat article. Want more.

Leave a reply to Anonymous Cancel reply

Advertisements
Blog Stats

560,806 hits

Advertisements
Advertisements