According to documents, non-atomic refresh of a materialized view uses truncate instead of delete in complete refresh. Is there any way to say oracle to use truncate instead of delete when creating a materialized view ?
1
-
1You'll need to use atomic_refresh=>false as Frank Schmitt describes. This is also why I do NOT setup a refresh schedule in the mat view creation itself (START WITH/NEXT syntax). Stick with dbms_scheduler to setup refresh schedule, calling dbms_mview.refresh – tbone Jul 3 '12 at 11:29
Add a comment
|
There's no method that I'm aware of - you have to explicitly call dbms_mview.refresh with atomic => false:
begin
dbms_mview.refresh( 'EMP_MV' , atomic_refresh => FALSE );
end;
EDIT: Unless you're using Oracle 9.2 or earlier - these versions perform a non-atomic refresh by default.
-
Obviously, this has not changed with 11.2g. You have to create the job yourself. – Michael-O Sep 2 '15 at 13:10