Ich habe in Schritten demonstriert, wo eine materialisierte Ansicht alle one minute
aktualisiert wird , um eine MV zu haben, die nach 5 Minuten aktualisiert wird, verwenden Sie next(sysdate+5/1440)
Schritt 1:
Create table temp (A int);
Schritt 2:
Create Materialized view temp_mv
refresh complete start with (sysdate) next (sysdate+1/1440) with rowid
as select * from temp;
Schritt 3:
select count(*) from temp;
COUNT(*)
----------
0
Schritt 4:
select count(*) from temp_mv;
COUNT(*)
----------
0
Schritt 5:
begin
for i in 1..10 loop
insert into temp values (i+1);
end loop;
end;
/
Schritt 6:
commit;
Schritt 7:
select count(*) from temp;
COUNT(*)
----------
10
Schritt 8:
select count(*) from temp_mv;
COUNT(*)
----------
0
Schritt 9:
select to_char(sysdate,'hh:mi') from dual;
TO_CH
-----
04:28
Schritt 10:
select to_char(sysdate,'hh:mi') from dual;
TO_CH
-----
04:29
Schritt 11:
select count(*) from temp;
COUNT(*)
----------
10
Schritt 12:
select count(*) from temp_mv;
COUNT(*)
----------
10