Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create materialized view with non-atomic refresh?

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 ?

like image 945
CGH Avatar asked Aug 09 '26 19:08

CGH


1 Answers

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.

like image 106
Frank Schmitt Avatar answered Aug 11 '26 12:08

Frank Schmitt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!