【Oracle九大效能檢視】之4.v$sesstat_根據session id查session的統計資訊
【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
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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Oracle九大效能檢視】之7.v$transaction_根據session id查session執行的事務OracleSession
- Oracle動態效能檢視之v$session_longops ztOracleSessionGo
- Oracle檢視查詢慢之統計資訊收集Oracle
- 檢視oracle當前sessionOracleSession
- 【Oracle九大效能檢視】之3.v$session_關於與其它效能檢視表聯合查問題SQLOracleSessionSQL
- 檢視鎖定的session資訊指令碼Session指令碼
- 效能檢視 V$Session_LONGOPSSessionGo
- 【Oracle九大效能檢視】之5.v$session_wait_session的等待情況及熱點塊OracleSessionAI
- 根據SQL_ID檢視執行計劃SQL
- v$session 檢視Session
- 如何刪除tomcat上的session,根據sessionID來刪TomcatSession
- v$session/v$process檢視涉及的相關會話資訊的查詢Session會話
- Oracle動態效能檢視學習筆記(7)_v$sessionOracle筆記Session
- ASH(Active Session History)——根據SID生產報告(3)!Session
- V$ACTIVE_SESSION_HISTORY 檢視中包含的資訊Session
- Oracle 檢視當前會話 SESSION ID 方法 說明Oracle會話Session
- 檢視引起阻塞的SessionSession
- 根據v$session 之status及logon_time有選擇kill某些session會話SessionGo會話
- Oracle等待檢視v$session_waitOracleSessionAI
- 【Oracle】gv$px_session 檢視介紹OracleSession
- windows下檢視oracle 執行緒 (session)WindowsOracle執行緒Session
- 檢視當前會話session id方法:會話Session
- Linux根據程式號,檢視相關資訊Linux
- 檢視瀏覽器請求的session 瀏覽器怎麼檢視session瀏覽器Session
- 會話統計資訊session_pkg會話Session
- oracle session阻塞查詢OracleSession
- 檢視歷史會話等待事件對應的session資訊會話事件Session
- 根據表查詢索引資訊索引
- 瀏覽器檢視Session瀏覽器Session
- 【會話】V$SESSION檢視會話Session
- 檢視鎖的資訊和alter system kill session的用法(小例子)Session
- 【Oracle九大效能檢視】之9.v$sysstat_所有instance的統計資訊Oracle
- Oracle動態效能檢視學習筆記(10)_v$session_waitOracle筆記SessionAI
- Oracle檢視已被使用的open_cursors&session_cached_cursorsOracleSession
- oracle 統計資訊檢視與收集Oracle
- v$session檢視中的sid和serial#研究Session
- Oracle效能優化之合理利用資源(session)Oracle優化Session
- V$session 檢視的小運用Session