このセクションでは、OceanBaseテナントの監視メトリクスである トランザクション応答時間 について説明します。トランザクション応答時間とは、サーバー側での各トランザクションの平均処理時間を指します。統計範囲を指定することで、単一ゾーンまたはOBServerノード上のテナントの トランザクション応答時間 データを照会できます。
local
メトリクス紹介
統計範囲内のローカルトランザクション応答時間。
メトリクスパラメータ説明
メトリクス項目 |
メトリクス名 |
単位 |
|---|---|---|
| local | trans_sp_total_used_time | μs |
計算式
sum(rate(ob_sysstat{stat_id="30080",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30012",@LABELS}[@INTERVAL])) by (@GBLABELS)
クエリSQL
OceanBase V3.2.4.1以降、V4.0未満のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30012, 30080) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.1.0.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30012, 30080) and (con_id > 1000 or con_id = 1) and class < 1000
distributed
メトリクス紹介
統計範囲内の分散トランザクション応答時間。
メトリクスパラメータ説明
メトリクス項目 |
メトリクス名 |
単位 |
|---|---|---|
| distributed | trans_distributed_total_used_time | μs |
計算式
sum(rate(ob_sysstat{stat_id="30081",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30013",@LABELS}[@INTERVAL])) by (@GBLABELS)
クエリSQL
OceanBase V3.2.4.1以降、V4.0未満のバージョン:
select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30013, 30081) and (con_id > 1000 or con_id = 1) and class < 1000OceanBase V4.1.0.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30013, 30081) and (con_id > 1000 or con_id = 1) and class < 1000