Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The V$OB_PX_TARGET_MONITOR view displays the usage of PX threads on the current OBServer node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the local server. |
| SVR_PORT | NUMBER(38) | NO | The port number of the local server. |
| TENANT_ID | NUMBER(38) | NO | The ID of the tenant. |
| IS_LEADER | CHAR(1) | NO | Indicates whether the replica is the leader replica of the dummy table. |
| VERSION | NUMBER(38) | NO | The number of times that statistics collection is reinitiated. |
| PEER_IP | VARCHAR2(46) | NO | The IP address of the peer server. |
| PEER_PORT | NUMBER(38) | NO | The port number of the peer server. |
| PEER_TARGET | NUMBER(38) | NO | The total number of PX threads on the peer server. |
| PEER_TARGET_USED | NUMBER(38) | NO | The number of used PX threads on the peer server. |
| LOCAL_TARGET_USED | NUMBER(38) | NO | The number of peer PX threads used by the local server. |
| LOCAL_PARALLEL_SESSION_COUNT | NUMBER(38) | NO | The number of sessions being concurrently executed on the local server. |
Sample query
Query the PX thread usage on the current OBServer node in the user tenant.
obclient [SYS]> SELECT * FROM SYS.V$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 | 1004 | Y | 334988734352026 | 11.xxx.xxx.xxx | 28825 | 10 | 0 | 0 | 0 |
+----------------+----------+-----------+-----------+-----------------+----------------+-----------+-------------+------------------+-------------------+------------------------------+
1 row in set