oracle materialized view refresh time

shaunf picture shaunf · Dec 19, 2008 · Viewed 20.6k times · Source

anyone able to tell me how often a materialized view is set to refresh with the following setting plz?

REFRESH FORCE ON DEMAND START WITH sysdate+0 NEXT (round(sysdate) + 1/24) + 1

i think i read it as every hour but i'm not sure

Answer

tuinstoel picture tuinstoel · Dec 19, 2008
SQL> alter session set nls_date_format = 'yyyy-mm-dd :hh24:mi:ss';

Session changed.

SQL> select sysdate from dual;

SYSDATE
--------------------
2008-12-19 :12:18:28

SQL> select (round(sysdate) + 1/24) + 1  from dual;

(ROUND(SYSDATE)+1/24
--------------------
2008-12-21 :01:00:00