Note
- The V$OB_QUERY_RESPONSE_TIME_HISTOGRAM view was introduced in OceanBase Database V4.3.5.
- The V$OB_QUERY_RESPONSE_TIME_HISTOGRAM view was introduced in OceanBase Database V4.2.1 BP7 for V4.2.1 and in OceanBase Database V4.2.5 for other V4.2.x versions.
Purpose
The V$OB_QUERY_RESPONSE_TIME_HISTOGRAM view is used to query the histogram information of the execution time of queries on the current node of the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(46) | NO | The IP address of the node. |
| SVR_PORT | NUMBER(38) | NO | The port of the node. |
| TENANT_ID | NUMBER(38) | NO | The tenant ID. |
| SQL_TYPE | VARCHAR2(128) | NO | The statement type of the query statement. Valid values include:
|
| RESPONSE_TIME | NUMBER | NO | The response time in seconds. |
| COUNT | NUMBER(38) | NO | The number of queries in the time interval. |
| TOTAL | NUMBER | NO | The total time of queries in the time interval, in seconds. |
Sample query
The following example queries the histogram information of the execution time of queries on the current node of the current tenant.
obclient [SYS]> SELECT * FROM SYS.V$OB_QUERY_RESPONSE_TIME_HISTOGRAM WHERE ROWNUM = 2\G
The sample 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
The following example queries the histogram information of the execution time of TABLEAPI SELECT queries on the current node of the current tenant.
obclient [SYS]> SELECT * FROM SYS.V$OB_QUERY_RESPONSE_TIME_HISTOGRAM WHERE SQL_TYPE = "TABLEAPI SELECT" AND ROWNUM = 2\G
The sample result is as follows:
*************************** 1. row ***************************
SVR_IP: 172.xx.xxx.xxx
SVR_PORT: 2882
TENANT_ID: 1004
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: 1004
SQL_TYPE: TABLEAPI SELECT
RESPONSE_TIME: 0.000010
COUNT: 0
TOTAL: 0.000000
2 rows in set