v$mystat v$statname

v$statname
v$mystat

SELECT * FROM v$statname;

statistic#:统计量编号,比如statistic#=0代表查询的会话信息OS CPU Qt wait time,统计事件的下标
NAME:统计事件的名称
CLASS:	统计事件所属类型别名称。
VALUE:VALUE 字段的具体含义取决于统计量的性质,可以表示计数、行数、次数等。
1 - User
2 - Redo
4 - Enqueue
8 - Cache
16 - OS
32 - Real Application Clusters
64 - SQL
128 - Debug

STAT_ID:统计信息的标识符,统计事件的id
SELECT * FROM "V_$SESSTAT" vs WHERE statistic#=0

统计信息相关视图查询
SELECT * FROM v$statname
SELECT NAME FROM V$STATNAME WHERE CLASS = 1;
class取值解释:

1 代表事例活动
select * from v$statname where class="1";
2 代表redo buffer活动
select * from v$statname where class="2";
4 代表锁
select * from v$statname where class="4";
8 代表数据缓冲活动
select * from v$statname where class="8";
--16 代表os活动
select * from v$statname where class="16";
32 代表并行活动
select * from v$statname where class="32";
33 32+1
select * from v$statname where class="33";
40 32+8
select * from v$statname where class="40";
64 代表表访问
select * from v$statname where class="64";
72 64+8
select * from v$statname where class="72";
128 代表调试信息
select * from v$statname where class="128";
192 128+64
select * from v$statname where class="192";

https://www.bookstack.cn/read/oceanbase-1.4-zh/ceda041dcbc02794.md

posted @ 2023-08-23 14:31  南大仙  阅读(21)  评论(0编辑  收藏  举报