Note
This view is available starting with V4.0.0.
Purpose
The DBA_OB_DEADLOCK_EVENT_HISTORY view displays the history of deadlock events in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| EVENT_ID | NUMBER(38) | NO | The ID of the deadlock event. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the node involved in the deadlock event. |
| SVR_PORT | NUMBER(38) | NO | The port number of the node involved in the deadlock event. |
| DETECTOR_ID | NUMBER(38) | NO | The ID of the node involved in the deadlock event (unique within a process). |
| REPORT_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The time when the deadlock event was reported (based on the timestamp of the reporting server). |
| CYCLE_IDX | NUMBER(38) | NO | The index of the node in the cycle. |
| CYCLE_SIZE | NUMBER(38) | NO | The number of nodes involved in the deadlock event. |
| ROLE | CLOB | NO | The role of the node in the deadlock event:
|
| PRIORITY_LEVEL | CLOB | NO | The priority level of the node:
|
| PRIORITY | NUMBER(38) | NO | The priority value of the node. When priorities are the same, the priority value is comparable, and the node with the lowest priority value in the cycle is eliminated. |
| CREATE_TIME | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The time when the node was created. |
| START_DELAY_US | NUMBER(38) | NO | The interval between the node's creation and the time it was allowed to start detecting deadlocks, in microseconds. |
| MODULE | CLOB | NO | The module to which the node belongs, which is fixed to transaction. |
| VISITOR | CLOB | NO | The resource visitor of the node, in the format {session_id:$1}:{txid:$2}, where $1 and $2 are numbers. |
| OBJECT | CLOB | NO | The resource that the node wants to acquire, described as the primary key of the row, in the format {addr:"$1:$2"}:{ls:$3}:{tablet:$4}:{row_key:{$5}}, where
|
| EXTRA_NAME1 | CLOB | YES | The name of the additional information 1 to be added to the deadlock reporting event, in the format wait_sql. |
| EXTRA_VALUE1 | CLOB | YES | The SQL statement currently being executed by the transaction that caused the deadlock. |
| EXTRA_NAME2 | CLOB | YES | The name of the additional information 2 to be added to the deadlock reporting event, in the format hold_sql_request_time |
| EXTRA_VALUE2 | CLOB | YES | The request time of the hold statement. |
| EXTRA_NAME3 | CLOB | YES | The name of the additional information 3 to be added to the deadlock reporting event, in the format hold_sql |
| EXTRA_VALUE3 | CLOB | YES | The SQL statement corresponding to the cycle_idx - 1 row record of the object. |
Sample query
Query the history of deadlock events in the current tenant.
obclient [SYS]> SELECT * FROM oceanbase.DBA_OB_DEADLOCK_EVENT_HISTORY LIMIT 10;
