Create materialized view with non-atomic refresh?
-
18-06-2021 - |
Question
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 ?
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow