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