Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The GV$OB_PX_TARGET_MONITOR view displays the usage of PX threads on all OBServer nodes.
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 ID of the tenant. |
| IS_LEADER | varchar(1) | NO | Indicates whether the replica is the leader replica of the dummy table. |
| VERSION | bigint(20) unsigned | NO | The number of times that statistics collection is reinitiated. |
| PEER_IP | varchar(46) | NO | The IP address of the peer server. |
| PEER_PORT | bigint(20) | NO | The port number of the peer server. |
| PEER_TARGET | bigint(20) | NO | The total number of PX threads on the peer server. |
| PEER_TARGET_USED | bigint(20) | NO | The number of used PX threads on the peer server. |
| LOCAL_TARGET_USED | bigint(20) | NO | The number of peer PX threads used by the local server. |
| LOCAL_PARALLEL_SESSION_COUNT | bigint(20) | NO | The number of sessions being concurrently executed on the local server. |
Sample query
In the sys tenant, query the PX thread usage on all OBServer nodes of all tenants.
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 | 1 | Y | 53513628009693 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1001 | Y | 334988696285371 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1002 | Y | 334988704308877 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1003 | Y | 334988725829150 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1004 | Y | 334988734352026 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1005 | Y | 335014014259655 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
| 11.xxx.xxx.xxx | 28825 | 1006 | Y | 335014022834572 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
+----------------+----------+-----------+-----------+-----------------+----------------+-----------+-------------+------------------+-------------------+------------------------------+
7 rows in set