User Tools

Site Tools


statistics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
statistics [2016/05/06 15:47] – created z0hpvkstatistics [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Database Statistics ====== ====== Database Statistics ======
  
-===== Restore Statistics =====+===== Restore =====
 <code>-- View historic table stats for the problematic tables <code>-- View historic table stats for the problematic tables
 SELECT table_name, stats_update_time FROM ALL_TAB_STATS_HISTORY SELECT table_name, stats_update_time FROM ALL_TAB_STATS_HISTORY
Line 13: Line 13:
 END; END;
 /</code> /</code>
 +
 +===== Pending =====
 +<code>-- 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;
 +/</code>
 +
 +===== Export =====
 +<code>BEGIN
 +dbms_stats.create_stat_table(ownname => 'SCANPRD1', stattab => 'STATISTICS_TABLE');
 +END;
 +/</code>
 +
 +<code>BEGIN
 +dbms_stats.export_table_stats(ownname => 'SCANPRD1', stattab => 'STATISTICS_TABLE', tabname => 'DM_SYSOBJECT_S', statid => 'CURRENT_STATS');
 +dbms_stats.export_table_stats(ownname => 'SCANPRD1', stattab => 'STATISTICS_TABLE', tabname => 'DM_SYSOBJECT_R', statid => 'CURRENT_STATS');
 +END;
 +/</code>
 +
 +
  
  
statistics.1462549675.txt.gz · Last modified: 2025/03/08 22:23 (external edit)