Oracle 10 Gb provides two activation methods, one for users and the other for tables.
Implementation Method for users:
- DBMS_STATS.ALTER_SCHEMA_TABLE_MONITORING (
- Ownname VARCHAR2DEFAULT NULL,
- Monitoring BOOLEANDEFAULT TRUE);
How to implement a single table (set the MONITORING attribute of the table)
Alter Table<Table_name> (MONITORING/NOMONITORING)
Query the table data change results
Select*FromUser_tab_modifications;
The above information can be used to clearly calculate the data changes of a table within a certain period of time. (It is more accurate to test how many records have been added, deleted, and modified for each monitor table)
If the user_tab_modifications view is not updated, after DML is executed, 9i can force update by executing the following statement. The default value is automatically updated every 15 minutes.
Exec dbms_stats.FLUSH_DATABASE_MONITORING_INFO ();
In 10g, if the initialization parameter statistics_level is TYPICAL or ALL, the table is automatically monitored.