Average execution duration of XA statements

2024-11-06 03:13:28  Updated

This topic describes the following performance metrics related to average execution duration of XA statements in an OceanBase Database tenant: xa_start_total_rt, xa_end_total_rt, xa_prepare_total_rt, xa_commit_total_rt, and xa_rollback_total_rt. You can specify a statistical range to query the metrics in a single zone or on a single OBServer node for a tenant.

xa_start_total_rt

Definition

The average execution duration of XA_START statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_start_total_rt xa_start_total_rt μs

Calculation expression

sum(rate(ob_sysstat{stat_id="30201",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30200",@LABELS}[@INTERVAL])) by (@GBLABELS)

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130201, 30200) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (130201, 30200) and (con_id > 1000 or con_id = 1) and class < 1000
    

xa_end_total_rt

Definition

The average execution duration of XA_END statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_end_total_rt xa_end_total_rt μs

Calculation expression

sum(rate(ob_sysstat{stat_id="30205",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30204",@LABELS}[@INTERVAL])) by (@GBLABELS)

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30205, 30204) and (con_id > 1000 or con_id = 1) and class < 1000
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (30205, 30204) and (con_id > 1000 or con_id = 1) and class < 1000
    

xa_prepare_total_rt

Definition

The average execution duration of XA_PREPARE statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_prepare_total_rt xa_prepare_total_rt μs

Calculation expression

sum(rate(ob_sysstat{stat_id="30209",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30208",@LABELS}[@INTERVAL])) by (@GBLABELS)

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ 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
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    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

Definition

The average execution duration of XA_COMMIT statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_commit_total_rt xa_commit_total_rt μs

Calculation expression

sum(rate(ob_sysstat{stat_id="30213",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30212",@LABELS}[@INTERVAL])) by (@GBLABELS)

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ 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
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    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

Definition

The average execution duration of XA_ROLLBACK statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_rollback_total_rt xa_rollback_total_rt μs

Calculation expression

sum(rate(ob_sysstat{stat_id="30217",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30216",@LABELS}[@INTERVAL])) by (@GBLABELS)

SQL statements for metric collection

  • If you use OceanBase Database of a version earlier than V4.0, execute the following statement:

    select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ 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
    
  • If you use OceanBase Database V4.0 or later, execute the following statement:

    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
    

Contact Us