v$waitstat和xbh.class的关系如何?
x$bh.class 中的分类,依次对应于 v$waitstat 中记录
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
SQL>
SQL> select * from v$waitstat;
CLASS COUNT TIME
------------------ ---------- ----------
data block 2 1
sort block 0 0
save undo block 0 0
segment header 1 0
save undo header 0 0
free list 0 0
extent map 0 0
1st level bmb 0 0
2nd level bmb 0 0
3rd level bmb 0 0
bitmap block 0 0
CLASS COUNT TIME
------------------ ---------- ----------
bitmap index block 0 0
file header block 0 0
unused 0 0
system undo header 0 0
system undo block 0 0
undo header 0 0
undo block 0 0
已选择18行。
SQL>
SQL> select distinct class from x$bh order by class ;
CLASS
----------
1
4
8
9
12
13
15
17 从这里开始依次为undo header /undo block
18
19
20
CLASS
----------
21
22
23
24
25
26
27
28
29
30
31
CLASS
----------
32
33
34
35
36
已选择27行。
SQL>
oracle 7 非系统回滚段是从9开始,8i是从13开始
从这里,基本就可以明白,v$waitstat 就是针对 data buffer 中各类型的block的等待进行统计的
本文地址:http://www.45fan.com/a/question/72481.html