このセクションでは、テナントのパフォーマンス指標であるQPS(Query Per Second)について説明します。SELECT文、INSERT文、UPDATE文、REPLACE文、DELETE文、COMMIT文、ROLLBACK文ごとの指標およびその他の文タイプに対する詳細な指標が含まれます。統計範囲を指定することで、単一ゾーンまたはOBServerノード上のテナントのQPSデータを照会できます。
all
指標紹介
1秒間に処理されるSQL文の総数。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| all | sql_all_count | times/s |
計算式
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
指標紹介
1秒間に処理されるSELECT文の数。
指標パラメータ説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| select | sql_select_count | times/s |
計算式
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
指標の紹介
1秒間に処理されるINSERT文の数。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| insert | sql_insert_count | times/s |
計算式
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
指標の紹介
1秒間に処理されるUPDATE文の数。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| update | sql_update_count | times/s |
計算式
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
指標の紹介
1秒間に処理されるREPLACEステートメントの数です。
メトリクスパラメータの説明
メトリクス項目 |
メトリクス名 |
単位 |
|---|---|---|
| replace | sql_replace_count | times/s |
計算式
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
指標の紹介
1秒間に処理されるDELETEステートメントの数です。
メトリクスパラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| delete | sql_delete_count | times/s |
計算式
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
指標の紹介
1秒間に処理されるDDL、DCL、DTLなどその他のステートメントの回数。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| other | sql_other_count | times/s |
計算式
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
commit
1秒間に処理されるCommitステートメントの数。
指標パラメータの説明
指標項目 |
指標名 |
単位 |
|---|---|---|
| commit | sql_commit_count | times/s |
計算式
sum(rate(ob_sysstat{stat_id="40025",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40025) and (con_id > 1000 or con_id = 1) and con_id in (select tenant_id from DBA_OB_TENANTS WHERE tenant_type<>'META')
rollback
1秒間に処理されるRollbackステートメントの数。
指標パラメータの説明
指標項目 |
指標名 |
単位 |
|---|---|---|
| rollback | sql_rollback_count | times/s |
計算式
sum(rate(ob_sysstat{stat_id="40027",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40027) and (con_id > 1000 or con_id = 1) and con_id in (select tenant_id from DBA_OB_TENANTS WHERE tenant_type<>'META')