Purpose
The DBA_WR_ACTIVE_SESSION_HISTORY displays the persisted Active Session History (ASH) data of the current tenant.
Note
This view is introduced since OceanBase Database V4.2.1.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CLUSTER_ID | NUMBER(38) | NO | The ID of the cluster. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant. |
| SNAP_ID | NUMBER(38) | NO | The ID of the snapshot. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER(38) | NO | The port of the server. |
| SAMPLE_ID | NUMBER(38) | NO | The sampling ID. |
| SESSION_ID | NUMBER(38) | NO | The ID of the sampled session. |
| SAMPLE_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The sampling time. |
| USER_ID | NUMBER(38) | YES | The user ID of the sampled session. |
| SESSION_TYPE | NUMBER(38) | YES | The type of the session. Valid values:
|
| SESSION_STATE | VARCHAR2(7) | NO | The status of the session when being sampled. Valid values:
|
| SQL_ID | VARCHAR2(32) | YES | The SQL ID. |
| TRACE_ID | VARCHAR2(64) | YES | The trace ID. |
| EVENT_NO | NUMBER(38) | YES | The internal number of the wait event, which is used for join query with other tables. |
| TIME_WAITED | NUMBER(38) | YES | The total wait time of the wait event. Unit: us. |
| P1 | NUMBER(38) | YES | The value of the first parameter of the wait event. |
| P2 | NUMBER(38) | YES | The value of the second parameter of the wait event. |
| P3 | NUMBER(38) | YES | The value of the third parameter of the wait event. |
| SQL_PLAN_LINE_ID | NUMBER(38) | YES | The ID of the SQL operator during sampling. If no operator is used, the value is NULL. |
| TIME_MODEL | NUMBER(38) | YES | The time model. |
| IN_PARSE | VARCHAR2(1) | NO | Indicates whether the current session is performing SQL parsing during sampling. |
| IN_PL_PARSE | VARCHAR2(1) | NO | Indicates whether the current session is performing SQL PL parsing during sampling. |
| IN_PLAN_CACHE | VARCHAR2(1) | NO | Indicates whether the current session is using the plan cache during sampling. |
| IN_SQL_OPTIMIZE | VARCHAR2(1) | NO | Indicates whether the current session is performing SQL tuning during sampling. |
| IN_SQL_EXECUTION | VARCHAR2(1) | NO | Indicates whether the current session is executing an SQL statement during sampling. |
| IN_PX_EXECUTION | VARCHAR2(1) | NO | Indicates whether the current session is performing parallel SQL execution during sampling. If the current session is in this state, it must be also in the IN_SQL_EXECUTION state. |
| IN_SEQUENCE_LOAD | VARCHAR2(1) | NO | Indicates whether the current 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. |
| IN_STORAGE_READ | VARCHAR2(1) | NO | Indicates whether the current sampling point is in the storage read phase. |
| IN_STORAGE_WRITE | VARCHAR2(1) | NO | Indicates whether the current sampling point is in the storage write phase. |
| IN_REMOTE_DAS_EXECUTION | VARCHAR2(1) | NO | Indicates whether the current sampling point is in the remote execution phase of direct-attached storage (DAS). |
| MODULE | VARCHAR2(64) | YES | The MODULE value recorded in the current session when being sampled. |
| ACTION | VARCHAR2(64) | YES | The ACTION value recorded in the current session when being sampled. |
| CLIENT_ID | VARCHAR2(64) | YES | The CLIENT_ID value recorded in the current session when being sampled. |
| BACKTRACE | VARCHAR2(512) | YES | An auxiliary debugging column, which records the code call stack when an event occurs. |
| PLAN_ID | NUMBER(38) | YES | The plan ID of the sampled SQL statement in the plan cache, which is used to associate the sampling point with the plan. |