【Oracle九大性能视图】之4.v$sesstat_根据session id查session的统计信息

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:50

【Oracle九大性能视图】之4.v$sesstat_根据session id查session的统计信息

1、表结构
SQL> desc v$sesstat
名称 是否为空? 类型
----------------------------------------- -------- ----------------------------
SID NUMBER
STATISTIC# NUMBER
VALUE NUMBER

2、相关SQL
select a.name, b.value
from v$statname a, v$sesstat b
where a.STATISTIC# = b.STATISTIC#
and b.sid = &sid
and b.value <> 0
order by b.value desc;

查得结果如下:
NAME VALUE
1 session pga memory 622168
2 session pga memory max 622168
3 session uga memory max 158768
4 session uga memory 158768
5 bytes sent via SQL*Net to client 30934
6 bytes received via SQL*Net from client 349
7 table scan rows gotten 94
8 recursive calls 30
9 SQL*Net roundtrips to/from client 8
10 user calls 8
11 opened cursors cumulative 7
12 parse count (total) 7
13 enqueue releases 6
14 enqueue requests 6
15 session logical reads 4
16 consistent gets 4
17 parse count (hard) 4
18 calls to get snapshot scn: kcmgss 4
19 consistent gets from cache 4
20 sql area evicted 3
21 session cursor cache count 3
22 table scan blocks gotten 2
23 CPU used when call started 2
24 no work - consistent read gets 2
25 parse time cpu 2
26 CPU used by this session 2
27 execute count 2
28 DB time 2
29 parse time elapsed 2
30 recursive cpu usage 2
31 logons cumulative 1
32 logons current 1
33 table scans (short tables) 1

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】