Purpose
The V$ACTIVE_SESSION_HISTORY view displays the active session history.
Note
This view is introduced since OceanBase Database V4.0.0.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server to which the sample belongs. |
| SVR_PORT | NUMBER | NO | The port number of the server to which the sample belongs. |
| SAMPLE_ID | NUMBER | NO | The unique ID of the sample. |
| SAMPLE_TIME | TIMESTAMP(6) | NO | The sampling time. |
| CON_ID | NUMBER | NO | The ID of the tenant. |
| USER_ID | NUMBER | NO | The ID of the user whose session is sampled. |
| SESSION_ID | NUMBER | NO | The ID of the sampled session. |
| SESSION_TYPE | VARCHAR2(10) | NO | The session type. Valid values:FOREGROUND: foreground session, that is, user session.BACKGROUND: background session, which is not supported for now. |
| SESSION_STATE | VARCHAR2(7) | NO | The session status. Valid values:ON CPU: The SQL logic is being executed without waiting.WAITING: The session is waiting. For more information, see the EVENT column. |
| SQL_ID | VARCHAR2(32) | NO | The SQL ID. |
| PLAN_ID | bigint(20) | NO | The plan ID of the sampled SQL statement in the plan cache, which is used to associate the sampling point with the plan. |
| TRACE_ID | VARCHAR2(64) | NO | The trace ID of the operator. |
| EVENT | VARCHAR2(64) | NO | The description of the wait event. |
| EVENT_NO | NUMBER | NO | The internal number of the wait event, which is used for join query with other tables. |
| P1TEXT | VARCHAR2(64) | NO | The name of the first parameter of the wait event. The parameter name varies with the event. |
| P1 | NUMBER | NO | The value of the first parameter of the wait event. |
| P2TEXT | VARCHAR2(64) | NO | The name of the second parameter of the wait event. The parameter name varies with the event. |
| P2 | NUMBER | NO | The value of the second parameter of the wait event. |
| P3TEXT | VARCHAR2(64) | NO | The name of the third parameter of the wait event. The parameter name varies with the event. |
| P3 | NUMBER | NO | The value of the third parameter of the wait event. |
| WAIT_CLASS | VARCHAR2(64) | NO | The class of the wait event. |
| WAIT_CLASS_ID | NUMBER | NO | The ID of the class of the wait event, which is used for join query with other tables. |
| TIME_WAITED | NUMBER | NO | The total wait time of the wait event. Unit: us. |
| SQL_PLAN_LINE_ID | NUMBER | NO | The ID of the SQL operator in the SQL plan when the session is being sampled. |
| IN_PARSE | VARCHAR2(1) | NO | Indicates whether the session is parsing an SQL statement during sampling. |
| IN_PL_PARSE | VARCHAR2(1) | NO | Indicates whether the session is parsing an SQL PL statement during sampling. |
| IN_PLAN_CACHE | VARCHAR2(1) | NO | Indicates whether the session is matching a plan cache during sampling. |
| IN_SQL_OPTIMIZE | VARCHAR2(1) | NO | Indicates whether the session is optimizing SQL parsing during sampling. |
| IN_SQL_EXECUTION | VARCHAR2(1) | NO | Indicates whether the session is executing an SQL statement during sampling. |
| IN_PX_EXECUTION | VARCHAR2(1) | NO | Indicates whether the session is executing SQL statements in parallel during sampling. If the session is in this state, it must also be in the state of SQL statement executing. |
| IN_SEQUENCE_LOAD | VARCHAR2(1) | NO | Indicates whether the session is generating values for an auto-increment column or a sequence during sampling. |
| IN_COMMITTING | VARCHAR2(1) | NO | Indicates whether the current sampling point is in the transaction commit phase.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| IN_STORAGE_READ | VARCHAR2(1) | NO | Indicates whether the current sampling point is in the storage read phase.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| IN_STORAGE_WRITE | VARCHAR2(1) | NO | Indicates whether the current sampling point is in the storage write phase.
NoteThis column is introduced since OceanBase Database V4.2.1. |
| IN_REMOTE_DAS_EXECUTION | VARCHAR2(1) | NO | Indicates whether the current sampling point is in the remote execution phase of direct-attached storage (DAS).
NoteThis column is introduced since OceanBase Database V4.2.1. |
| MODULE | VARCHAR2(64) | NO | The MODULE value recorded during session sampling. The value is always NULL. |
| ACTION | VARCHAR2(64) | NO | The ACTION value recorded during session sampling. The value is always NULL. |
| CLIENT_ID | VARCHAR2(64) | NO | The CLIENT_ID value recorded during session sampling. The value is always NULL. |
| BACKTRACE | VARCHAR2(512) | NO | An auxiliary debugging column, which records the code call stack when an event occurs. The value is always NULL. |