v$undostat的一点理解

原创 转载请注明出处

今天在看ORACLE Concepts 的时候重新认识了下v$undostat 视图,觉得这个视图对查看UNDO的使用的使用情况非常有用,可以说可以确定出
你的UNDO tablespace是否合理,这里还注意一点,就是TYPE2 UNDO这个类型是使用撤销段而不是使用传统的回退段的时候的段类型。
    对所有字段进行逐一解释:
    BEGIN_TIME : Identifies the beginning of the time interval
    本视图采用每10分钟进行分割,这个字段是一个分割的起始时间。
    END_TIME   : Identifies the end of the time interval
    这个字段是一个分割的结束时间。
    UNDOTSN    : Represents the last active undo tablespace in the duration of time.
    这个字段理解得不清楚,大概是时间段内活动的撤销表空间。
    UNDOBLKS   : Represents the total number of undo blocks consumed. You can use this
                  column to obtain the consumption rate of undo blocks, and thereby
                  estimate the size of the undo tablespace needed to handle the workload on
                  your system.
    这个字段显示了这段时间以来总的消耗的撤销块的大小,可以用来估计你的撤销表空间设置是否合理。
    TXNCOUNT   : Identifies the total number of transactions executed within the period
    显示了这段时间以来的总的事物总量。
    MAXQUERYLEN : Identifies the length of the longest query (in seconds) executed in the
                   instance during the period. You can use this statistic to estimate the proper
                   setting of the UNDO_RETENTION initialization parameter. The length of a
                   query is measured from the cursor open time to the last fetch/execute
                   time of the cursor. Only the length of those cursors that have been
                   fetched/executed during the period are refected in the view.
    这个字段显示了这段时间以来最长的查询,为了防止快照太旧的情况,可以通过这个字段来设置UNDO_RETENTION参数的大小
    MAXQUERYID : SQL identifier of the longest running SQL statement in the period
    显示了运行最长时间的sql_id,可以通过这个字段查询出运行时间最长的SQL(连接v$sql视图)
    MAXCONCURRENCY : Identifies the highest number of transactions executed concurrently within
                      the period
    显示了本段时间以来事务并发执行的最大数。
    UNXPSTEALCNT : Number of attempts to obtain undo space by stealing unexpired extents
                    from other transactions
    当撤销表空间不足以保存UNDO_RETENTION参数所指定的时间的时候,就会尝试使用没有过期的撤销空间,当然这个字段为0最好
    UNXPBLKRELCNT : Number of unexpired blocks removed from certain undo segments so they
                     can be used by other transactions
    同上这个字段使用块为单位
    UNXPSTEALCNT  : Number of attempts to obtain undo space by stealing unexpired extents
                     from other transactions
    这个字段是以分区为单位                
    UNXPBLKRELCNT : Number of unexpired blocks removed from certain undo segments so they
                     can be used by other transactions
    UNXPBLKREUCNT : Number of unexpired undo blocks reused by transactions
                     EXPSTEALCNT NUMBER Number of attempts to steal expired undo blocks from other undo
                     segments
    EXPBLKRELCNT  : Number of expired undo blocks stolen from other undo segments
    EXPBLKREUCNT  : Number of expired undo blocks reused within the same undo segments
    我觉得以上的几个字段都是由于撤销表空间不足而导致的,最好都为0.
    
   

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7728585/viewspace-614481/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7728585/viewspace-614481/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值