You Asked
I am seeing that when I use the dbms_mview.refresh function to refresh a group of Materialized Views, that the view contents are deleted. I have also seen that if I set atomic_refresh to False, that Truncate should be used. In reading the description of atomic_refresh indicates whether the group of MV's is refresh together or as independent refreshes. It does not discuss 'Delete' vs 'Truncate'.My situation is that I have several MV's that are quite large and would prefer to refresh them using Truncate.
My question, If I provide a list of MV's to the dbms_mview.refresh function, what is the use of Truncate, based on the setting of atomic_refresh? Or, should I be doing something else to ensure that Truncate is used?
[@more@]
and we said...
http://asktom.oracle.com/pls/ask/search?p_string=%22atomic_refresh%22
we've talked about this a couple of times.
If you "have several MV's that are quite large and would prefer to refresh them using Truncate", in 10g and above you would use atomic_refresh=>FALSE
that permits us to user
truncate+insert/*+APPEND*/
to rebuild the MV (the MV disappears for a while, becomes empty - you have to expect that)
else, if atomic_refresh=>TRUE, we use
delete+insert
to rebuild the MV (the MV never disappears, transactional consistency is there)
If you use a list like mv1,mv2... - and atomic_refresh=>FALSE, it'll use truncate+insert/*+Append*/ on them in turn.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10130206/viewspace-1056922/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10130206/viewspace-1056922/