# Response time (OBKV-Table)
This topic describes the OBKV-Table performance metrics related to the response time of SQL statements within a tenant. The response time is the time consumed by an OBServer node in processing a single SQL statement. To be specific, the response time refers to the period from the time when the OBServer node receives an SQL statement to the time when the SQL statement is executed. You can specify a statistical period to query these metrics of a tenant in a single zone or on a single OBServer node.
all
Definition
The average time spent in processing an SQL statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| all | obkv_table_sql_all_rt | μs |
Calculation expression
(sum(rate(ob_sysstat{stat_id="190002",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190102",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190202",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190302",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190402",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190502",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191102",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191202",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191302",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190004",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190104",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190204",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190304",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190404",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190504",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191104",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191204",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191304",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190902",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190905",@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id="190001",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190101",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190201",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190301",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190401",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190501",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191101",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191201",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191301",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190003",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190103",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190203",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190303",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190403",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190503",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191103",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191203",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191303",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190901",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190904",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
select
Definition
The average time spent in processing a SELECT statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| select | obkv_table_sql_select_rt | μs |
Calculation expression
(sum(rate(ob_sysstat{stat_id="190002",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190004",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190902",@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id="190001",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190003",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190901",@LABELS}[@INTERVAL])) by (@GBLABELS))
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
insert
Definition
The average time spent in processing an INSERT statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| insert | obkv_table_sql_insert_rt | μs |
Calculation expression
(sum(rate(ob_sysstat{stat_id="190102",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190402",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191302",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190104",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190404",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191304",@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id="190101",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190401",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191301",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190103",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190403",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="191303",@LABELS}[@INTERVAL])) by (@GBLABELS))
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
update
Definition
The average time spent in processing an UPDATE statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| update | obkv_table_sql_update_rt | μs |
Calculation expression
(sum(rate(ob_sysstat{stat_id="190302",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191102",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191202",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190304",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191104",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191204",@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id="190301",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191101",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191201",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190303",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191103",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="191203",@LABELS}[@INTERVAL])) by (@GBLABELS))
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
replace
Definition
The average time spent in processing a REPLACE statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| replace | obkv_table_sql_replace_rt | μs |
Calculation expression
(sum(rate(ob_sysstat{stat_id="190502",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190504",@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id="190501",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190503",@LABELS}[@INTERVAL])) by (@GBLABELS))
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
delete
Definition
The average time spent in processing a DELETE statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| delete | obkv_table_sql_delete_rt | μs |
Calculation expression
(sum(rate(ob_sysstat{stat_id="190202",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190204",@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id="190201",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="190203",@LABELS}[@INTERVAL])) by (@GBLABELS))
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
query and mutate
Definition
The average time spent in processing a query and mutation statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| query and mutate | obkv_table_sql_query_mutate_rt | μs |
Calculation expression
sum(rate(ob_sysstat{stat_id="190905",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="190904",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
other
Definition
The average time spent in processing each of other statements, such as a data definition language (DDL), data control language (DCL), or data transaction language (DTL) statement.
Description
| Metric category | Metric name | Unit |
|---|---|---|
| other | obkv_table_sql_other_rt | μs |
Calculation expression
sum(rate(ob_sysstat{stat_id="190702",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="190701",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL statements for metric collection
OceanBase Database of a version earlier than V4.0:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30082, 30083, 30084, 30085, 30086, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 60087, 80001, 80002, 80003, 80007, 80008, 80009, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200000, 200001, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)OceanBase Database V4.0 and later
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (10000, 10001, 10002, 10003, 10004, 10005, 10006, 20000, 20001, 20002, 30000, 30001, 30002, 30005, 30006, 30007, 30008, 30009, 30010, 30011, 30012, 30013, 30080, 30081, 30200, 30201, 30204, 30205, 30208, 30209, 30212, 30213, 30216, 30217, 30220, 30221, 30222, 40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40010, 40011, 40012, 40018, 40019, 40030, 40116, 40117, 40118, 50000, 50001, 50002, 50004, 50005, 50008, 50009, 50010, 50011, 50037, 50038, 60000, 60001, 60002, 60003, 60004, 60005, 60019, 60020, 60021, 60022, 60023, 60024, 80040, 80041, 80057, 120000, 120001, 120008, 120009, 130000, 130001, 130002, 130004, 140002, 140003, 140005, 140006, 140012, 140013, 190001, 190002, 190003, 190004, 190005, 190101, 190102, 190103, 190104, 190105, 190201, 190202, 190203, 190204, 190205, 190301, 190302, 190303, 190304, 190305, 190401, 190402, 190403, 190404, 190405, 190501, 190502, 190503, 190504, 190505, 190601, 190602, 190603, 190701, 190702, 190707, 190801, 190901, 190902, 190903, 190904, 190905, 190906, 191001, 191002, 191003, 191004, 191005, 191006, 191007, 191008, 191009, 191010, 191011, 191012, 191015, 191016, 191017, 191018, 191019, 191020, 191021, 191022, 191023, 191024, 191101, 191102, 191103, 191104, 191105, 191201, 191202, 191203, 191204, 191205, 191301, 191302, 191303, 191304, 191305, 200002, 200005, 200006, 200010, 200013) and (con_id > 1000 or con_id = 1)
99-all
Definition
The average time spent in processing an SQL statement (TP99).
Description
| Metric category | Metric name | Unit |
|---|---|---|
| 99-all | obkv_table_sql_all_rt_tp99 | μs |
Calculation expression
histogram_quantile(0.99, sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI SELECT", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI INSERT", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI DELETE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI UPDATE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI REPLACE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI QUERY AND MUTATE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI OTHER", @LABELS}[@INTERVAL])) by (@GBLABELS,le))
SQL statements for metric collection
OceanBase Database V4.2.1.7 and later but earlier than V4.2.2.0:
select t1.tenant_id, t1.svr_ip, t1.sql_type, (case when t1.response_time >= t0.max_rt then '+Inf' else t1.response_time * 1000000 end) as response_time, t1.total_count, t1.total_value * 1000000 as total_value, sum(t2.total_count) as cumulative_count, sum(t2.total_value) * 1000000 as cumulative_value from (select max(response_time) as max_rt from gv$ob_query_response_time_histogram) t0 join (select tenant_id, svr_ip, sql_type, response_time, sum(count) as total_count, sum(total) as total_value from gv$ob_query_response_time_histogram group by response_time, tenant_id, svr_ip, sql_type) t1 inner join (select tenant_id, svr_ip, sql_type, response_time, sum(count) as total_count, sum(total) as total_value from gv$ob_query_response_time_histogram group by response_time, tenant_id, svr_ip, sql_type) t2 on t1.response_time >= t2.response_time and t1.tenant_id = t2.tenant_id and t1.svr_ip = t2.svr_ip and t1.sql_type = t2.sql_type where t1.svr_ip = ? group by t1.response_time, t1.tenant_id, t1.sql_type
95-all
Definition
The average time spent in processing an SQL statement (TP95).
Description
| Metric category | Metric name | Unit |
|---|---|---|
| 95-all | obkv_table_sql_all_rt_tp95 | μs |
Calculation expression
histogram_quantile(0.95, sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI SELECT", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI INSERT", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI DELETE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI UPDATE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI REPLACE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI QUERY AND MUTATE", @LABELS}[@INTERVAL])) by (@GBLABELS,le) + sum(rate(ob_query_rt_cumulative_count{sql_type="TABLEAPI OTHER", @LABELS}[@INTERVAL])) by (@GBLABELS,le))
SQL statements for metric collection
OceanBase Database V4.2.1.7 and later but earlier than V4.2.2.0:
select t1.tenant_id, t1.svr_ip, t1.sql_type, (case when t1.response_time >= t0.max_rt then '+Inf' else t1.response_time * 1000000 end) as response_time, t1.total_count, t1.total_value * 1000000 as total_value, sum(t2.total_count) as cumulative_count, sum(t2.total_value) * 1000000 as cumulative_value from (select max(response_time) as max_rt from gv$ob_query_response_time_histogram) t0 join (select tenant_id, svr_ip, sql_type, response_time, sum(count) as total_count, sum(total) as total_value from gv$ob_query_response_time_histogram group by response_time, tenant_id, svr_ip, sql_type) t1 inner join (select tenant_id, svr_ip, sql_type, response_time, sum(count) as total_count, sum(total) as total_value from gv$ob_query_response_time_histogram group by response_time, tenant_id, svr_ip, sql_type) t2 on t1.response_time >= t2.response_time and t1.tenant_id = t2.tenant_id and t1.svr_ip = t2.svr_ip and t1.sql_type = t2.sql_type where t1.svr_ip = ? group by t1.response_time, t1.tenant_id, t1.sql_type