statistics
This is an old revision of the document!
Table of Contents
Database Statistics
Restore
-- View historic table stats for the problematic tables SELECT table_name, stats_update_time FROM ALL_TAB_STATS_HISTORY WHERE OWNER = 'SCANPRD1' AND TABLE_NAME in ('DM_SYSOBJECT_R','DM_SYSOBJECT_S') ORDER BY TABLE_NAME, STATS_UPDATE_TIME;
-- Restore previous database stats for the 2 tables BEGIN dbms_stats.restore_table_stats('SCANPRD1','DM_SYSOBJECT_S',TO_DATE('01-MAY-2015 08:00','DD-MON-YYYY HH24:MI')); dbms_stats.restore_table_stats('SCANPRD1','DM_SYSOBJECT_R',TO_DATE('01-MAY-2015 08:00','DD-MON-YYYY HH24:MI')); END; /
Pending
-- Using the Pending Statistics feature, change the settings -- so that any new statistics do not get published automatically BEGIN dbms_stats.set_table_prefs('SCANPRD1','DM_SYSOBJECT_S','PUBLISH','false'); dbms_stats.set_table_prefs('SCANPRD1','DM_SYSOBJECT_R','PUBLISH','false'); END; /
statistics.1462549794.txt.gz · Last modified: 2025/03/08 22:23 (external edit)