FLUSH_DATABASE_MONITORING_INFO Procedure
作者:互联网
FLUSH_DATABASE_MONITORING_INFO Procedure
This procedure flushes in-memory monitoring information for all tables in the dictionary. Corresponding entries in the *_TAB_MODIFICATIONS, *_TAB_STATISTICS and *_IND_STATISTICS views are updated immediately, without waiting for the Oracle database to flush them periodically. This procedure is useful when you need up-to-date information in those views. Because the GATHER_*_STATS procedures internally flush monitoring information, it is not necessary to run this procedure before gathering the statistics.
Syntax
DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;
这是从官方文档上摘取的一部分文字,这个存储过程用来将内存中监控的表的改变量刷新到磁盘,记录在以下表中:
*_TAB_MODIFICATIONS
*_TAB_STATISTICS
*_IND_STATISTICS
从DBA_TAB_MODIFICATIONS表中,我们就可以获取哪些表被DELETE,UPDATE或者TRUNCATE过,甚至可以监控DROP SEGMENT的状况。后面也有时间戳的统计。这让我们对热点表能够有一个清晰的了解,从而更加有针对性的收集热点表的统计信息。
SQL> desc DBA_TAB_MODIFICATIONS
Name Null? Type
----------------------------------------- -------- ----------------------------
TABLE_OWNER VARCHAR2(30)
TABLE_NAME VARCHAR2(30)
PARTITION_NAME VARCHAR2(30)
SUBPARTITION_NAME VARCHAR2(30)
INSERTS NUMBER
UPDATES NUMBER
DELETES NUMBER
TIMESTAMP DATE
TRUNCATED VARCHAR2(3)
DROP_SEGMENTS NUMBER
这是DBA_TAB_MODIFICATIONS表的表结构。
标签:INFO,MODIFICATIONS,STATISTICS,MONITORING,DATABASE,30,NUMBER,VARCHAR2,TAB 来源: https://www.cnblogs.com/yaoyangding/p/15164719.html