Overview
The GV$OB_QUERY_RESPONSE_TIME_HISTOGRAM view is used to collect histogram statistics on query execution times for all nodes in the current tenant.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | Node IP |
| SVR_PORT | bigint(20) | NO | Node Port Number |
| TENANT_ID | bigint(20) | NO | tenant |
| SQL_TYPE | varchar(128) | NO | Statement types of QUERY:
|
| RESPONSE_TIME | decimal(24,6) | NO | Response time interval, in seconds |
| COUNT | bigint(20) | NO | Count of Records within the Range |
| TOTAL | decimal(24,6) | NO | The total duration of the corresponding interval, in seconds. |
Sample query
Query the histogram information of query execution time for all nodes in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$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: 1002
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: 1002
SQL_TYPE: SELECT
RESPONSE_TIME: 0.000010
COUNT: 0
TOTAL: 0.000000
2 rows in set
Query the histogram information of query execution time for TABLEAPI SELECT on all nodes of the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$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.225
SVR_PORT: 2882
TENANT_ID: 1002
SQL_TYPE: TABLEAPI SELECT
RESPONSE_TIME: 0.000001
COUNT: 0
TOTAL: 0.000000
*************************** 2. row ***************************
SVR_IP: 172.xx.xxx.225
SVR_PORT: 2882
TENANT_ID: 1002
SQL_TYPE: TABLEAPI SELECT
RESPONSE_TIME: 0.000010
COUNT: 0
TOTAL: 0.000000
2 rows in set