Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
In parallel execution scenarios, displays the execution information about each PX worker thread in all tenants on all OBServer nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SESSION_ID | bigint(20) | NO | For V4.3.x:
|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| TRACE_ID | varchar(128) | NO | The trace ID of the SQL statement. |
| QC_ID | bigint(20) | NO | The query coordinator (QC) ID in parallel execution. |
| SQC_ID | bigint(20) | NO | The sub query coordinator (SQC) ID in parallel execution. |
| WORKER_ID | bigint(20) | NO | The ID of the thread. |
| DFO_ID | bigint(20) | NO | The data flow operator (DFO) ID in parallel execution. |
| START_TIME | timestamp(6) | NO | The time when the thread started to run. |
Sample query
In the sys tenant, query the execution information of all threads in all tenants on all OBServer nodes in parallel execution scenarios.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_PX_WORKER_STAT\G
The query result is as follows:
***************** 1. row *****************
SESSION_ID: 3221520411
TENANT_ID: 1002
SVR_IP: 192.xx.xx.xx
SVR_PORT: 19510
TRACE_ID: Y4Cxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-0-0
QC_ID: 1
SQC_ID: 0
WORKER_ID: 0
DFO_ID: 0
START_TIME: 2023-04-23 17:29:17.372461
***************** 2. row *****************
SESSION_ID: 3221520410
TENANT_ID: 1004
SVR_IP: 192.xx.xx.xx
SVR_PORT: 19510
TRACE_ID: Y4Cxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-0-0
QC_ID: 1
SQC_ID: 0
WORKER_ID: 0
DFO_ID: 0
START_TIME: 2023-04-23 17:29:15.372461
2 rows in set