I need to automatically refresh a Materialized view at irregular intervals, like 0800hrs, 1200hrs 1800hrs and 2200hrs. I am only able to get as far as scheduling the refresh at regular intervals, like given below
…
REFRESH FORCE ON DEMAND START WITH sysdate+0 NEXT sysdate+(6/24)
AS Select * from Employee;
You can have a
CASEstatement in yourNEXT. So you can do something likeFor general sanity, I would generally create a new function (i.e.
get_next_refresh_time) that implements thisCASEstatement and just reference the function in your materialized view.