User Tools

Site Tools


statistics

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
statistics [2016/05/06 15:49] 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 14: Line 14:
 /</code> /</code>
  
-===== Pending Statistics ===== +===== Pending ===== 
-<code>-- Using the Pending Statistics feature, change the settings so that any new statistics do not get published automatically+<code>-- Using the Pending Statistics feature, change the settings  
 +-- so that any new statistics do not get published automatically
 BEGIN BEGIN
 dbms_stats.set_table_prefs('SCANPRD1','DM_SYSOBJECT_S','PUBLISH','false'); dbms_stats.set_table_prefs('SCANPRD1','DM_SYSOBJECT_S','PUBLISH','false');
Line 21: Line 22:
 END; END;
 /</code> /</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.1462549751.txt.gz · Last modified: 2025/03/08 22:23 (external edit)