Saya telah mendemonstrasikan dalam langkah-langkah di mana tampilan yang terwujud disegarkan setelah setiap one minute
, untuk memiliki mv yang menyegarkan setelah 5 menit gunakan next(sysdate+5/1440)
Langkah1:
Create table temp (A int);
Langkah2:
Create Materialized view temp_mv
refresh complete start with (sysdate) next (sysdate+1/1440) with rowid
as select * from temp;
Langkah3:
select count(*) from temp;
COUNT(*)
----------
0
Langkah4:
select count(*) from temp_mv;
COUNT(*)
----------
0
Langkah5:
begin
for i in 1..10 loop
insert into temp values (i+1);
end loop;
end;
/
Langkah6:
commit;
Langkah7:
select count(*) from temp;
COUNT(*)
----------
10
Langkah8:
select count(*) from temp_mv;
COUNT(*)
----------
0
Langkah9:
select to_char(sysdate,'hh:mi') from dual;
TO_CH
-----
04:28
Langkah10:
select to_char(sysdate,'hh:mi') from dual;
TO_CH
-----
04:29
Langkah11:
select count(*) from temp;
COUNT(*)
----------
10
Langkah12:
select count(*) from temp_mv;
COUNT(*)
----------
10