analyze table arcsdbss.sst004 compute statistics;
【統計情報を戻す】
SQL> SELECT OWNER, TABLE_NAME, STATS_UPDATE_TIME FROM DBA_TAB_STATS_HISTORY WHERE TABLE_NAME='CSM002';
OWNER TABLE_NAME STATS_UPDATE_TIME
------------------------------ ------------------------------ ----------------------------------------
ARCSDBCS CSM002 23-12-05 09:31:54.785459 +09:00
ARCSDBCS CSM002 23-12-06 19:33:18.937235 +09:00
exec DBMS_STATS.RESTORE_TABLE_STATS( ownname=>'arcsdbcs',tabname=>'CSM002',as_of_timestamp=>'23-12-05 09:00:00.000000');
※ 戻したい時刻に、ヒストリの間の時刻を設定。
※
ERROR at line 1:
ORA-20005: object statistics are locked (stattype = ALL)
exec DBMS_STATS.UNLOCK_TABLE_STATS('ARCSDBCB' , 'CCP002');
select table_name, partition_name, subpartition_name, num_rows, stattype_locked from dba_tab_statistics where owner = 'ARCSDBCB' and table_name='CCP003';
→ stattype_locked = ALL だとロックがかかっている状態。
0 件のコメント:
コメントを投稿