【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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 檢視瀏覽器請求的session 瀏覽器怎麼檢視session瀏覽器Session
- Oracle檢視已被使用的open_cursors&session_cached_cursorsOracleSession
- Linux根據程式號,檢視相關資訊Linux
- 瀏覽器檢視Session瀏覽器Session
- oracle 統計資訊檢視與收集Oracle
- Oracle錶的歷史統計資訊檢視Oracle
- Oracle Session每日統計功能實現XLAMOracleSession
- session檢視中wait_timeSessionAI
- Oracle session traceOracleSession
- V$ACTIVE_SESSION_HISTORY檢視的使用Session
- 用 logoff trigger 保留每個 session 的效能資訊(轉)GoSession
- [20211019]V$DETACHED_SESSION檢視.txtSession
- Oracle不同版本檢視資料庫session/system級別設定了哪些eventsOracle資料庫Session
- mybatis 根據多個id查詢資料 foreach標籤MyBatis
- 分享一個session過期後根據guard跳轉的實現Session
- IOS音視訊(四十三)AVFoundation 之 Audio SessioniOSSession
- 檢視oracle資料庫session事務設定的是哪個隔離級別Oracle資料庫Session
- MyBatis-maven-User例子-根據id查詢UserMyBatisMaven
- JWT 還是 session 根據實際業務使用不是更好嗎JWTSession
- day14--【Mybatis】動態代理--根據id查詢MyBatis
- [20221130]測試訪問檢視v$session幾種情況的效能差異.txtSession
- oracle ebs 根據請求id找到對應trace 檔案Oracle
- [20211214]檢視檢視V$ACTIVE_SESSION_HISTORY遇到奇怪問題.txtSession
- Oracle檢視sql_id 的歷史執行計劃OracleSQL
- 【TUNE_ORACLE】Oracle檢查點(二)檢查點效能Oracle
- 【TUNE_ORACLE】檢查統計資訊是否過期SQL參考OracleSQL
- 【統計資訊】全面檢視錶所有統計資訊SQLSQL
- 統計資訊查詢檢視|全方位認識 sys 系統庫
- 【TUNE_ORACLE】等待事件之IO等待“read by other session”Oracle事件Session
- OB運維 | 連線 kill 中的 session_id運維Session
- stored procedure 收集session wait 資訊(轉)SessionAI
- 【TUNE_ORACLE】檢視錶,列和索引的統計資訊SQL參考Oracle索引SQL
- [js] 根據元素ID遍歷樹形結構,查詢到所有父元素IDJS
- Python 根據id生成唯一碼Python
- 【統計資訊】Oracle統計資訊Oracle
- 拼多多根據ID取商品詳情 API介面(item_get-根據ID取商品詳情)API
- PostgreSQL統計資訊的幾個重要檢視SQL
- 關於 PHP Session ID 改變的問題解決PHPSession
- 新手發問 ! Laravel admin 根據ID判斷資料Laravel