資料庫遷移後的統計資訊更新

husthxd發表於2009-06-17

在目標資料庫上:

TABLE級別:

exec dbms_stats.UNLOCK_TABLE_STATS(ownname => '',tabname => 'PUBLIC_SERVICE');


exec dbms_stats.gather_table_stats(ownname => '',tabname => 'PUBLIC_SERVICE',estimate_percent => null ,method_opt => 'for all indexed columns',degree=>4,CASCADE=>true);


SCHEMA級別:

exec dbms_stats.UNLOCK_SCHEMA_STATS(ownname => 'USER>');

exec dbms_stats.gather_schema_stats(ownname => 'USER>',estimate_percent => null ,method_opt => 'for all indexed columns',degree=>4,CASCADE=>true);


exec dbms_stats.gather_schema_stats(ownname => 'USER>',degree=>4,CASCADE=>true);



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/6906/viewspace-606570/,如需轉載,請註明出處,否則將追究法律責任。

相關文章