首页 > Linux操作系统 > Linux操作系统 > v$undostat学习


原创 Linux操作系统 作者:haha牛 时间:2012-02-14 11:49:35 0 删除 编辑


V$UNDOSTATdisplays a histogram of statistical data to show how well the system is working. The available statistics include undo space consumption, transaction concurrency, and length of queries executed in the instance. You can use this view to estimate the amount of undo space required for the current workload. Oracle uses this view to tune undo usage in the system. The view returns null values if the system is in manual undo management mode.

--补:此视图主要是记录undo tablespace使用情况,采用10分钟为间隔采样,最多存储7day的数据,

Each row in the view keeps statistics collected in the instance for a 10-minute interval. The rows are in descending order by theBEGIN_TIMEcolumn value. Each row belongs to the time interval marked by (BEGIN_TIME,END_TIME). Each column represents the data collected for the particular statistic in that time interval. The first row of the view contains statistics for the (partial) current time period. The view contains a total of 1008 rows, spanning a 7 day cycle.


Column Datatype Description
BEGIN_TIME DATE Identifies the beginning of the time interval
END_TIME DATE Identifies the end of the time interval
UNDOTSN --采样间隔的undo tablespace标识号,如果当时有多个活动的undo tablespace,仅记录最后一个活动的标识号
NUMBER Represents the last active undo tablespace in the duration of time. The tablespace ID of the active undo tablespace is returned in this column. If more than one undo tablespace was active in that period, the active undo tablespace that was active at the end of the period is reported.
--采样间隔共用多少undo blocks,用它大致可以估计出你undo tablespace的大小了
NUMBER 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.

NUMBER Identifies the total number of transactions executed within the period
NUMBER 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 theUNDO_RETENTIONinitialization 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 reflected in the view.
sql id

VARCHAR2(13) SQL identifier of the longest running SQL statement in the period
NUMBER Identifies the highest number of transactions executed concurrently within the period

NUMBER Number of attempts to obtain undo space by stealing unexpired extents from other transactions
--被其它事务使用的来自于undo segements未过期的块数

NUMBER Number of unexpired blocks removed from certain undo segments so they can be used by other transactions
--事务重用的未过期的undo block数

NUMBER Number of unexpired undo blocks reused by transactions
---多少次尝试从其它undo segment得到未过期的undo block

NUMBER Number of attempts to steal expired undo blocks from other undo segments
--从其它undo segment得到的过期undo block数

NUMBER Number of expired undo blocks stolen from other undo segments
--同样undo segment中,被重用的过期undo block数

NUMBER Number of expired undo blocks reused within the same undo segments
NUMBER Identifies the number of times the errorORA-01555occurred. You can use this statistic to decide whether or not theUNDO_RETENTIONinitialization parameter is set properly given the size of the undo tablespace. Increasing the value ofUNDO_RETENTIONcan reduce the occurrence of this error.
--多少次向undo tablespace发出空间请求,修正行为就是添加更多的undo tablespace size
NUMBER Identifies the number of times space was requested in the undo tablespace and there was no free space available. That is, all of the space in the undo tablespace was in use by active transactions. The corrective action is to add more space to the undo tablespace.
NUMBER Total number of blocks in the active extents of the undo tablespace for the instance at the sampled time in the period
NUMBER Total number of blocks in the unexpired extents of the undo tablespace for the instance at the sampled time in the period
NUMBER Total number of blocks in the expired extents of the undo tablespace for the instance at the sampled time in the period


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

上一篇: v$rollstat
请登录后发表评论 登录


  • 博文量
  • 访问量