Oracle 视图 DBA_HIST_WAITSTAT 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_HIST_WAITSTAT存储由AWR所记录的等待事件状态历史信息,其中包括等待事件的总数及按用户分组的等待事件状态历史的详细信息,一般用于查询数据库等待发生问题时的历史信息。
使用此视图需要满足如下条件:
1. SWITCHSTAT监控必须打开,可以使用如下语句查看监控是否打开:
SELECT CLIENT_NAME, SWITCH_TIME, STATUS FROM V$ACTIVE_SESSION_HISTORY WHERE EVENT LIKE ‘%switch%’;
2. 等待事件必须已经被监控,可以使用如下语句查看监控到的等待事件:
SELECT * FROM V$WAITSTAT;
使用此视图可以查询某一特定时间段内的等待事件状态信息,可以指定多种排序方式,例如:
SELECT *
FROM DBA_HIST_WAITSTAT
WHERE SNAP_ID BETWEEN &snap_id_start AND &snap_id_end
ORDER BY SNAP_ID;
官方英文解释
DBA_HIST_WAITSTAT
displays historical block contention statistics. This view contains snapshots of V$WAITSTAT
.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Unique snapshot ID |
|
|
|
Database ID for the snapshot |
|
|
|
Instance number for the snapshot |
|
|
|
Class of the block |
|
|
Number of waits by the OPERATION for this CLASS of block |
|
|
|
Sum of all wait times for all the waits by the OPERATION for this CLASS of block |
|
|
|
The database ID of the PDB for the sampled session |
|
|
|
The ID of the container that
|
See Also:
“V$WAITSTAT”