1. 首页
  2. IT资讯

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://www.cxybcw.com/183159.html

联系我们

13687733322

在线咨询:点击这里给我发消息

邮件:1877088071@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code