首批通过分布式安全可靠测评,为关键业务系统打造
QPS
更新时间:2025-07-02 15:25:53
本节为您介绍租户的性能指标 QPS(Query Per Second)。 包括分别针对 SELECT 语句,INSERT 语句、UPDATE 语句、REPLACE 语句、DELETE 语句的指标及针对所有类型的语句的细分指标。您可指定统计范围,查询租户在单个 Zone 或 OBServer 节点的 QPS 数据。
all
指标介绍
每秒处理 SQL 语句总次数。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| all | sql_all_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="40018",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
OceanBase V4.0 以下版本:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN ( 40000, 40002, 40004, 40006, 40008, 40018) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40000, 40002, 40004, 40006, 40008, 40018) and (con_id > 1000 or con_id = 1) and class < 1000
select
指标介绍
每秒处理 SELECT 语句次数。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| select | sql_select_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
OceanBase V4.0 以下版本:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN ( 40000) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40000) and (con_id > 1000 or con_id = 1) and class < 1000
insert
指标介绍
每秒处理 INSERT 语句次数。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| insert | sql_insert_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
OceanBase V4.0 以下版本:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN ( 40002) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40002) and (con_id > 1000 or con_id = 1) and class < 1000
update
指标介绍
每秒处理 UPDATE 语句次数。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| update | sql_update_count | 次 |
计算表达式
sum(rate(sysstat_value{metric_group="sysstat",stat_id="40006",@LABELS}[@INTERVAL]) by (@GBLABELS)) by (@GBLABELS)
SQL 采集
OceanBase V4.0 以下版本:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN ( 40006) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40006) and (con_id > 1000 or con_id = 1) and class < 1000
replace
指标介绍
每秒处理 REPLACE 语句次数。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| replace | sql_replace_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
OceanBase V4.0 以下版本:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN ( 40004) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40004) and (con_id > 1000 or con_id = 1) and class < 1000
delete
指标介绍
每秒处理 DELETE 语句次数。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| delete | sql_delete_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
OceanBase V4.0 以下版本:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN ( 40008) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40008) and (con_id > 1000 or con_id = 1) and class < 1000
other
指标介绍
每秒处理 DDL、DCL、DTL 等其他语句次数。
指标参数说明
| 指标项 | 指标名称 | 单位 |
|---|---|---|
| other | sql_other_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40018",@LABELS}[@INTERVAL])) by (@GBLABELS)
采集 SQL
OceanBase V4.0 以下版本:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40018) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40018) and (con_id > 1000 or con_id = 1) and class < 1000