Tuesday, March 7, 2017
Determining the Optimal Undo Retention Period
You can calculate the actual undo that’s generated in your database by issuing the following query
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
----------------------
122159104000
###############################
You can calculate the value of UNDO_BLOCKS_PER_SEC with the following query:
SQL> select max(undoblks/((end_time-begin_time)*3600*24))
"UNDO_BLOCK_PER_SEC"
FROM v$undostat;
UNDO_BLOCK_PER_SEC
-------------------------------------------
85.1966666666667
###############################
you can calculate a more precise value for the UNDO_RETENTION parameter.Use the following formula to calculate the value of the UNDO_RETENTION parameter
UNDO_RETENTION = UNDO SIZE/(DB_BLOCK_SIZE*UNDO_BLOCK_PER_SEC)
177515.5545222041 = 122159104000 /(8096*85.19)
No comments:
Post a Comment