轉載 V$ACTIVE_SESSION_HISTORY視圖相關了解---http://blog.csdn.net/haibusuanyun/article/details/17959973
V$ACTIVE_SESSION_HISTORY 顯示數據庫中的采樣會話活動。ASH每秒從v$session中取快照,存在V$ACTIVE_SESSION_HISTORY中,并收集所有活動會話的等待信息。若ASH數據被刷新到磁盤,則需要從DBA_HIS_ACTIVE_SESS_HISTORY視圖中查詢相關信息。
該視圖是ASH的核心,用以記錄活動SESSION的歷史等待信息,每秒采樣一次,這部分內容記錄在內存中,期望值是記錄一個小時的內容。
列名 | 數據類型 | 說明 |
---|---|---|
SAMPLE_ID | NUMBER | 樣本的ID |
SAMPLE_TIME | TIMESTAMP(3) | 取樣本的時間 |
SESSION_ID | NUMBER | 會話標識符; 映射到 V$SESSION.SID |
SESSION_SERIAL# | NUMBER | 會話序列號 (用于唯一標識一個會話的對象); 映射到 V$SESSION.SERIAL# |
USER_ID | NUMBER | Oracle用戶標識符; 映射到 V$SESSION.USER# |
SQL_ID | VARCHAR2(13) |
會話在取樣時執行的 SQL 語句的 SQL 標識符
|
SQL_CHILD_NUMBER | NUMBER | Child number of the SQL statement that the session was executing at the time of sampling |
SQL_PLAN_HASH_VALUE | NUMBER |
sql游標計劃的數值表示形式。這所有會話樣本的信息可能不可用。v$session不包含此信息。
|
FORCE_MATCHING_SIGNATURE | NUMBER | The signature used when the CURSOR_SHARING parameter is set to FORCE |
SQL_OPCODE | NUMBER | Indicates what phase of operation the SQL statement was in; maps to V$SESSION.COMMAND。 “V$SESSION” for information on interpreting this column |
SERVICE_HASH | NUMBER | Hash that identifies the Service; maps to V$ACTIVE_SERVICES.NAME_HASH |
SESSION_TYPE | VARCHAR2(10) |
會話類型:
|
SESSION_STATE | VARCHAR2(7) |
會話狀態:
|
QC_SESSION_ID | NUMBER | 查詢協調器的會話ID。This information is only available if the sampled session is a parallel query slave. For all other sessions, the value is 0. |
QC_INSTANCE_ID | NUMBER | 查詢協調器實例的ID。 This information is only available if the sampled session is a parallel query slave. For all other sessions, the value is 0. |
BLOCKING_SESSION | NUMBER | 阻塞會話的會話標識符。Populated only when the session was waiting for enqueues or a “buffer busy” wait. Maps toV$SESSION.BLOCKING_SESSION. |
BLOCKING_SESSION_STATUS | VARCHAR2(11) |
阻塞會話的狀態:
|
BLOCKING_SESSION_SERIAL# | NUMBER | 阻塞會話的序列號 |
EVENT | VARCHAR2(64) | If SESSION_STATE = WAITING, then the event for which the session was waiting for at the time of sampling.If SESSION_STATE = ON CPU, then this column will be NULL.See Also: “Oracle Wait Events” |
EVENT_ID | NUMBER | Identifier of the resource or event for which the session is waiting or for which the session last waited. Interpretation is similar to that of theEVENT column. |
EVENT# | NUMBER | Number of the resource or event for which the session is waiting or for which the session last waited. Interpretation is similar to that of theEVENT column. |
SEQ# | NUMBER | 序列號唯一標識等待(增加每個等待) |
P1TEXT | VARCHAR2(64) | 第一個附加參數的文本 |
P1 | NUMBER | 第一個附加參數 |
P2TEXT | VARCHAR2(64) | 第二個參數的文本 |
P2 | NUMBER | 第二個附加參數 |
P3TEXT | VARCHAR2(64) | 第三個附加參數的文本 |
P3 | NUMBER | 第三個附加參數 |
WAIT_CLASS | VARCHAR2(64) | Wait class name of the event for which the session was waiting at the time of sampling. Interpretation is similar to that of the EVENT column. Maps to V$SESSION.WAIT_CLASS. |
WAIT_CLASS_ID | NUMBER | 等待的會話在等待的時間采樣的事件的類標識符。Interpretation is similar to that of the EVENTcolumn. Maps to V$SESSION.WAIT_CLASS_ID. |
WAIT_TIME | NUMBER | 0 if the session was waiting at the time of samplingTotal wait time for the event for which the session last waited if the session was on the CPU when sampledWhether or not WAIT_TIME = 0 is what is useful to find the SESSION_STATE at the time of sampling, rather than the actual value of WAIT_TIMEitself. Maps to V$SESSION.WAIT_TIME. |
TIME_WAITED | NUMBER | If SESSION_STATE = WAITING, then the time that the session actually spent waiting for that EVENT. This column is set for waits that were in progress at the time the sample was taken.If a wait event lasted for more than a second and was caught waiting in more than one session sample row, then the actual time spent waiting for that wait event will be populated in the last of those session sample rows. At any given time, this information will not be available for the latest session sample. |
XID | RAW(8) | Transaction ID that the session was working on at the time of sampling. V$SESSION does not contain this information. |
CURRENT_OBJ# | NUMBER | 對象ID的會話被引用的對象。此信息僅供如果會話在等待申請,集群,并發和用戶I / O等待事件。映射到 V$SESSION.ROW_WAIT_OBJ#. |
CURRENT_FILE# | NUMBER | File number of the file containing the block that the session is referencing. This information is only available if the session was waiting for Cluster, Concurrency, and User I/O wait events. Maps to V$SESSION.ROW_WAIT_FILE#. |
CURRENT_BLOCK# | NUMBER | ID of the block that the session is referencing. This information is only available if the session was waiting for Cluster, Concurrency, and User I/O wait events. Maps to V$SESSION.ROW_WAIT_BLOCK#. |
PROGRAM | VARCHAR2(48) | 操作系統程序的名稱 |
MODULE | VARCHAR2(48) | Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_MODULE procedure |
ACTION | VARCHAR2(32) | Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_ACTION procedure |
CLIENT_ID | VARCHAR2(64) | Client identifier of the session; maps to V$SESSION.CLIENT_IDENTIFIER |
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。