Sizing an UNDO tablespace

The formula shown here calculates the optimal size for an undo tablespace using the following variables:
  UR-the undo retention period expressed in seconds
  UPS-the number of undo blocks generated per second
  DBS-the size of data blocks
 
  Undospace=[UR*(UPS*DBS)]+(DBS*24)
 
UR can be found from undo_retention parameter
DBS can be found from db_block_size parameter
UPS can be found from v$undostat view, which capture the statistics data of undo tablespace over 10 minutes period. The begin_time and end_time are always in 10 minutes interval, except the first record, which is the current state.
 
The following SQL can be used to find UPS
select sum ( undoblks )/ sum (( 24 * 3600 *( end_time - begin_time ))) UPS from v$undostat
 
The formula can be done with one SQL:
 
select
(( UR *( UPS * DBS ))+( DBS * 24 ))/( 1024 * 1024 ) SIZE_AS_MEGABYTES
from
(select
(select
(select value as ur from v$parameter where name = 'undo_retention' ), value as dbs from v$parameter where name = 'db_block_size' ), sum ( undoblks )/ sum (( 24 * 3600 *( end_time - begin_time ))) ups from v$undostat )
 
To get good result, that must be done when you database has heaviest workload. And also it should be adjusted frequently.
  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值