千家信息网

确定最优的撤销保留时间 undo_rentention

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,SQL> show parameter undoNAME TYPE VALUE------------------------------------ ----------- ------------
千家信息网最后更新 2025年02月01日确定最优的撤销保留时间 undo_rentention

SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> alter system set undo_retention=1800 scope=both

SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 1800
undo_tablespace string UNDOTBS1


SQL> select sum(d.bytes) "undo" from v$datafile d , v$tablespace t , dba_tablespaces s where s.contents = 'UNDO' and s.status = 'ONLINE' and t.name = s.tablespace_name and d.ts# = t.ts#;


undo
----------
31457280


SQL> select max(undoblks/((end_time-begin_time)*3600*24)) "UNDO_BLOCK_PER_SEC" from v$undostat;


UNDO_BLOCK_PER_SEC
------------------
2.90217391





0