【Oracle九大效能檢視】之4.v$sesstat_根據session id查session的統計資訊

jst143發表於2011-02-10
【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


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23577591/viewspace-686974/,如需轉載,請註明出處,否則將追究法律責任。

相關文章