GV$OB_QUERY_RESPONSE_TIME_HISTOGRAM

2025-11-14 07:33:33  Updated

Note

  • For V4.3.x, this view was introduced in V4.3.5.
  • For V4.2.1, this view was introduced in V4.2.1 BP7. For V4.2.x other than V4.2.1, this view was introduced in V4.2.5.

Purpose

The GV$OB_QUERY_RESPONSE_TIME_HISTOGRAM view is used to query the histogram information of query execution times on all nodes of the current tenant.

Columns

Column Type Allowable Values Description
SVR_IP varchar(46) NO IP address of the node
SVR_PORT bigint(20) NO Port number of the node
TENANT_ID bigint(20) NO ID of the tenant
SQL_TYPE varchar(128) NO Statement type of the query:
  • SELECT
  • INSERT
  • UPDATE
  • DELETE
  • REPLACE
  • COMMIT
  • OTHER
  • INNER SQL
  • TABLEAPI SELECT
  • TABLEAPI INSERT
  • TABLEAPI DELETE
  • TABLEAPI UPDATE
  • TABLEAPI REPLACE
  • TABLEAPI QUERY AND MUTATE
  • TABLEAPI OTHER
  • HBASE SCAN
  • HBASE PUT
  • HBASE DELETE
  • HBASE APPEND
  • HBASE INCREMENT
  • HBASE CHECK AND PUT
  • HBASE CHECK AND DELETE
  • HBASE HYBRID BATCH
RESPONSE_TIME decimal(24,6) NO Response time in seconds
COUNT bigint(20) NO Number of queries in the time interval
TOTAL decimal(24,6) NO Total time in the time interval in seconds

Sample query

The following example queries the histogram information of query execution times on all nodes of the current tenant.

obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_QUERY_RESPONSE_TIME_HISTOGRAM LIMIT 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 TABLEAPI SELECT queries 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 sample 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

References

V$OB_QUERY_RESPONSE_TIME_HISTOGRAM

Contact Us