有没有办法知道物化视图刷新完成需要多长时间?

问题描述 投票:0回答:1

我通过 dblink 为表创建了一些物化视图。第一次创建物化视图时,由于数据巨大,花费了近 20 多分钟的时间。所以,我想知道,为了进一步刷新这些物化视图,刷新需要多长时间才能完成。我尝试在网络上搜索,大多数答案都是为了获取最后刷新时间。

oracle refresh materialized-views
1个回答
0
投票
select last_refresh_date,
       last_refresh_end_time,
        extract ( day from diff ) days,
        extract ( hour from diff ) hours,
        extract ( minute from diff ) minutes,
        extract ( second from diff ) seconds
from (
    SELECT mview_name,
           last_refresh_date,
           last_refresh_end_time,
           numtodsinterval(last_refresh_end_time - last_refresh_date, 'day') as diff
    FROM user_mviews
);
LAST_REFRESH_DATE LAST_REFRESH_END_TIME 天数 小时 分钟
2024-07-22 13:15:00 2024-07-22 13:15:21 0 0 0 21
2024-07-22 13:15:00 2024-07-22 13:15:27 0 0 0 27
2024-07-22 13:15:00 2024-07-22 13:15:00 0 0 0 0
2024-07-24 20:28:54 2024-07-24 20:28:54 0 0 0 0
2024-07-25 02:42:45 2024-07-25 02:42:49 0 0 0 4
2024-07-22 13:15:00 2024-07-22 13:15:01 0 0 0 1
2024-07-22 13:15:00 2024-07-22 13:29:38 0 0 14 38
2024-07-22 13:15:00 2024-07-22 13:28:27 0 0 13 27
2024-04-08 01:50:53 2024-04-08 01:50:53 0 0 0 0
2024-04-08 01:56:10 2024-04-08 01:56:10 0 0 0 0
© www.soinside.com 2019 - 2024. All rights reserved.