STAHL 8003/111 PTB 02 ATEX 1057X

如何设置undo表空间大小

从Oracle 9i版本后,数据库使用了自动undo管理模式。

 


那设置多大的undo表空间比较合适呢?

metalink 262066.1给出了建议。

简单来说就是SQL语句执行的最长时间*这段时间平均产生的undo大小。

首先找出最大的每秒生产的undo大小:(这里是按最大的来评估,因为平均值看起来太小了)
 

点击(此处)折叠或打开

  1. SELECT (SUM(undoblks)/SUM(((end_time - begin_time)*86400))) * 8192 / 1024 /1024 AS UPS_MB
  2.               FROM dba_hist_undostat t
  3.               where t.begin_time
  4.                between to_date('2016-11-10 00:30:00', 'yyyy-mm-dd hh24:mi:ss')
  5.                and to_date('2016-11-18 18:45:59', 'yyyy-mm-dd hh24:mi:ss')
  6.                and undoblks in (
  7.                   select max(undoblks) from dba_hist_undostat
  8.                   where begin_time
  9.                    between to_date('2016-11-10 00:30:00', 'yyyy-mm-dd hh24:mi:ss')
  10.                    and to_date('2016-11-18 18:45:59', 'yyyy-mm-dd hh24:mi:ss')
  11.                   )
  12.     UPS_MB
  13. ----------
  14. 10.0615885


 

按最大的undoblks * undo_retention (评估值14400)

10m*14400 = 144,000m

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值