このセクションでは、OceanBaseテナントのパフォーマンス指標である XAステートメントの実行時間 について説明します。XAステートメントの実行時間 指標は、OceanBaseテナントのXAステートメントの実行時間を集計するために使用されます。この指標は、xa_start_total_rt、xa_end_total_rt、xa_prepare_total_rt、xa_commit_total_rt、xa_rollback_total_rt の5つのサブ指標に細分化され、テナントのXAステートメントの実行時間を集計します。統計範囲を指定することで、単一ゾーンまたはOBServerノード上のテナントの XAステートメントの実行時間 を照会できます。
xa_start_total_rt
指標の紹介
OceanBaseテナントのxa_start ステートメントの実行時間。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| xa_start_total_rt | xa_start_total_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="30201",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30200",@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 (30200, 30201) 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 (30200, 30201) and (con_id > 1000 or con_id = 1) and class < 1000
xa_end_total_rt
指標の紹介
OceanBaseテナントのxa_end ステートメントの実行時間。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| xa_end_total_rt | xa_end_total_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="30205",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30204",@LABELS}[@INTERVAL])) by (@GBLABELS)
クエリSQL
OceanBase V4.2.2.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30204, 30205) and (con_id > 1000 or con_id = 1) and class < 1000
xa_prepare_total_rt
指標の紹介
OceanBaseテナントのxa_prepareステートメントの実行時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| xa_prepare_total_rt | xa_prepare_total_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="30209",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30208",@LABELS}[@INTERVAL])) by (@GBLABELS)
クエリの例
OceanBase V4.2.2.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30208, 30209) and (con_id > 1000 or con_id = 1) and class < 1000
xa_commit_total_rt
指標の紹介
OceanBaseテナントのxa_commitステートメントの実行時間です。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| xa_commit_total_rt | xa_commit_total_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="30213",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30212",@LABELS}[@INTERVAL])) by (@GBLABELS)
クエリの例
OceanBase V4.2.2.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30212, 30213) and (con_id > 1000 or con_id = 1) and class < 1000
xa_rollback_total_rt
指標の紹介
OceanBaseテナントのxa_rollbackステートメント実行時間。
指標パラメータの説明
メトリクス項目 |
指標名 |
単位 |
|---|---|---|
| xa_rollback_total_rt | xa_rollback_total_rt | μs |
計算式
sum(rate(ob_sysstat{stat_id="30217",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30216",@LABELS}[@INTERVAL])) by (@GBLABELS)
取得SQL
OceanBase V4.2.2.0以降のバージョン:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30216, 30217) and (con_id > 1000 or con_id = 1) and class < 1000