Note
- For V4.3.x, this view is available starting with V4.3.5.
- For V4.2.1, this view is available starting with V4.2.1 BP7. For other V4.2.x versions, this view is available starting with V4.2.5.
Purpose
The V$OB_QUERY_RESPONSE_TIME_HISTOGRAM view is used to collect histogram information about the query execution time on the current node for all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the node. |
| SVR_PORT | bigint(20) | NO | The port number of the node. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| SQL_TYPE | varchar(128) | NO | The statement type of the query. Valid values:
|
| RESPONSE_TIME | decimal(24,6) | NO | The interval value of the response time, in seconds. |
| COUNT | bigint(20) | NO | The count of queries in the interval. |
| TOTAL | decimal(24,6) | NO | The total time of queries in the interval, in seconds. |
Sample query
Query the histogram information about the query execution time on the current node for all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_QUERY_RESPONSE_TIME_HISTOGRAM LIMIT 2\G;
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
TENANT_ID: 1
SQL_TYPE: SELECT
RESPONSE_TIME: 0.000001
COUNT: 0
TOTAL: 0.000000
*************************** 2. row ***************************
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
TENANT_ID: 1
SQL_TYPE: SELECT
RESPONSE_TIME: 0.000010
COUNT: 0
TOTAL: 0.000000
2 rows in set
Query the histogram information about the execution time of TABLEAPI SELECT queries on the current node for all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_QUERY_RESPONSE_TIME_HISTOGRAM WHERE SQL_TYPE = "TABLEAPI SELECT" LIMIT 2\G;
The query result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
TENANT_ID: 1
SQL_TYPE: TABLEAPI SELECT
RESPONSE_TIME: 0.000001
COUNT: 0
TOTAL: 0.000000
*************************** 2. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
TENANT_ID: 1
SQL_TYPE: TABLEAPI SELECT
RESPONSE_TIME: 0.000010
COUNT: 0
TOTAL: 0.000000
2 rows in set
