Note
This view is available starting with V4.0.0.
Purpose
This view displays the PX thread usage on all OBServer nodes for the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the local server. |
| SVR_PORT | bigint(20) | NO | The port number of the local server. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| IS_LEADER | varchar(1) | NO | Indicates whether the server is the leader of the dummy table. |
| VERSION | bigint(20) unsigned | NO | The number of times statistics collection has been restarted. |
| PEER_IP | varchar(46) | NO | The IP address of the remote server. |
| PEER_PORT | bigint(20) | NO | The port number of the remote server. |
| PEER_TARGET | bigint(20) | NO | The total number of PX threads on the remote server. |
| PEER_TARGET_USED | bigint(20) | NO | The number of PX threads used on the remote server. |
| LOCAL_TARGET_USED | bigint(20) | NO | The number of PX threads used on the local server. |
| LOCAL_PARALLEL_SESSION_COUNT | bigint(20) | NO | The number of sessions that are being executed in parallel on the local server. |
Sample query
Query the PX thread usage on all OBServer nodes for the current user tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_PX_TARGET_MONITOR;
The query result is as follows:
+----------------+----------+-----------+-----------+-----------------+----------------+-----------+-------------+------------------+-------------------+------------------------------+
| SVR_IP | SVR_PORT | TENANT_ID | IS_LEADER | VERSION | PEER_IP | PEER_PORT | PEER_TARGET | PEER_TARGET_USED | LOCAL_TARGET_USED | LOCAL_PARALLEL_SESSION_COUNT |
+----------------+----------+-----------+-----------+-----------------+----------------+-----------+-------------+------------------+-------------------+------------------------------+
| 11.xxx.xxx.xxx | 28825 | 1002 | Y | 334988704308877 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
+----------------+----------+-----------+-----------+-----------------+----------------+-----------+-------------+------------------+-------------------+------------------------------+
1 row in set
