Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FAST refresh of MV with ATOMIC_REFRESH=FALSE appears to do a TRUNCATE

Duncan GardnerNov 27 2011 — edited Nov 28 2011
When I refresh a Materialized View of mine with atomic_refresh=FALSE, the MV temporarily has zero rows. I would expect a fast refresh MV to be refreshed in one transaction, and certainly not to have a truncate applied to it.
exec dbms_mview.refresh('duncan_mv','f', atomic_refresh=>FALSE);

Note that the changes I make are to update a column of an underlying table, that is not even used in the MV. There are no inserts or deletes. Yet querying the MV returns zero rows for a few seconds.

If I omit the atomic_refresh parameter (which defaults to TRUE), all is OK. Yet I would expect atomic_refresh to only have an effect when I am refreshing multiple MVs. The doco says:
"If this parameter is set to true, then the list of materialized views is refreshed in a single transaction. All of the refreshed materialized views are updated to a single point in time. If the refresh fails for any of the materialized views, none of the materialized views are updated.
If this parameter is set to false, then each of the materialized views is refreshed in a separate transaction."

Yet what I observe is that each (there is only one) MV is being refreshed in at least two transactions.

Have I missed something ?

What I want to be able to do is refresh multiple fast-refresh MVs, not in one transaction (i.e. atomic_refresh=FALSE), but without the MVs being truncated or data temporarily disappearing.

Oracle 10.2.0.4.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 26 2011
Added on Nov 27 2011
2 comments
4,752 views