Oracle加快回滾速度
阿新 • • 發佈:2019-01-06
FAST_START_PARALLEL_ROLLBACK specifies the degree of parallelism used when recovering terminated transactions. Terminated transactions are transactions that are active before a system failure. If a system fails when there are uncommitted parallel DML or DDL transactions, then you can speed up transaction recovery during startup by using this parameter.
關於fast_start_parallel_rollback引數,此引數決定了回滾啟動的並行次數,在繁忙的系統或者IO效能較差的系統,如果出現大量回滾操作,會顯著影響系統,可以通過調節此引數來降低影響
VALUES:
false:parallel rollback is disabled
low:limits the maximum degree of parallelim to 2*cpu_count
high:limits the maximum degree of parallelim to 4*cpu_count
If you change the value of this parameter, then transaction recovery will be stopped and restarted with the new implied degree of parallelism.
else:另外將fast_start_parallel_rollback時,建議將parallel_force_local調整為true,以限制所有的程序都只執行在當前例項,不至於拖垮其他的節點。
回滾時間計算:
alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS'; select usn, state, undoblockstotal "Total", undoblocksdone "Done", undoblockstotal - undoblocksdone "ToDo", decode(cputime, 0, 'unknown', sysdate + (((undoblockstotal - undoblocksdone) / (decode(UNDOBLOCKSDONE,0,1,UNDOBLOCKSDONE) / cputime)) / 86400)) "Estimated time to complete" from v$fast_start_transactions where state!='RECOVERED';