2015-12-14 96 views
1

我有一個簡單的物化視圖(上的Oracle 11g):歷史刷新物化視圖

CREATE MATERIALIZED VIEW "MV_TEST" 
    TABLESPACE "DATA" 
    REFRESH FAST ON DEMAND 
    WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT 
    USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE 
    AS 
    SELECT 
    1,2,3 
    FROM 
    [email protected]; 

,我這個刷新:

begin  

     DBMS_MVIEW.REFRESH(MV_TEST, 'FAST', '', TRUE, FALSE, 0,0,0,FALSE, FALSE); 
end; 

如何我可以看到刷新操作的歷史喜歡這個?

1-dic-2015 10:34 fast 
1-dic-2015 10:50 fast 
1-dic-2015 10:55 fast 
1-dic-2015 11:05 fast 
1-dic-2015 11:30 fast 

回答

2

您可以使用此:

SELECT * FROM ALL_MVIEW_REFRESH_TIMES; 

SELECT * FROM ALL_MVIEW_REFRESH_TIMES where last_refresh between '29-OCT-10' AND '31-OCT-10'; 

SELECT * FROM ALL_MVIEW_REFRESH_TIMES where last_refresh > '28-OCT-10';