Why does DBA_TAB_MODIFICATIONS sometimes have no values [ID 762738.1](二)

2014-11-24 16:43:31 · 作者: · 浏览: 1
no rows selected
SQL> execute DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;
PL/SQL procedure successfully completed.
SQL> col table_name format a5
SQL> col table_owner format a10
SQL> select TABLE_OWNER, TABLE_NAME, INSERTS , UPDATES, DELETES, TIMESTAMP from
2 sys.dba_tab_modifications where TABLE_OWNER='CRC';
TABLE_OWNER TABLE INSERTS UPDATES DELETES TIMESTAMP
------------- ----- ---------- ---------- ---------- -----------------
CRC GS 100 21 21 18-03-09 15:34:37
==> Because of the 'high' volumne of DML (100 inserts, 21 updates and 21 deletes) we have an entry in the table
sys.dba_tab_modifications for the table 'GS'.
STEP3: *** analyze again the table GS which leads to an empty sys.DBA_TAB_MODIFICATIONS for table 'GS'
-----------------------------------------------------------------------------------------------------------------------
SQL> begin
2 dbms_stats.gather_schema_stats(
3 ownname =>'CRC',
4 estimate_percent => dbms_stats.auto_sample_size,
5 method_opt =>'FOR ALL COLUMNS SIZE AUTO',
6 degree => 1,
7 granularity => 'ALL',
8 cascade =>
true,
9 options => 'GATHER'
10 );
11 end;
12 /
PL/SQL procedure successfully completed.
SQL> select TABLE_OWNER, TABLE_NAME, INSERTS , UPDATES, DELETES, TIMESTAMP from
2 sys.dba_tab_modifications where TABLE_OWNER='CRC';
no rows selected ==> which is normal due to the analyze command
STEP4: *** now perform only 1 update on the table, flush the monitoring information out and then check the
entry in DBA_TAB_MODIFICATIONS
---------------------------------------------------------------
SQL> update crc.gs gs set i=i+100 where i=30;
1 row updated.
SQL> commit;
Commit complete.
SQL> execute DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;
PL/SQL procedure successfully completed.
SQL> select TABLE_OWNER, TABLE_NAME, INSERTS , UPDATES, DELETES, TIMESTAMP from
2 sys.dba_tab_modifications where TABLE_OWNER='CRC';
no rows selected
Note: please be aware that this is only an example. Other values/dml changes may show different results.
References
NOTE:456535.1 - DB Monitoring Automatic