Number of XA statements

2025-03-28 08:05:55  Updated

This topic describes the following performance metrics related to the number of XA statements in an OceanBase Database tenant: xa_start_total_count, xa_end_total_count, xa_prepare_total_count, xa_commit_total_count, and xa_rollback_total_count. 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_count

Definition

The number of XA_START statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_start_total_count xa_start_total_count N/A

Calculation expression

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 (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 (30200) and (con_id > 1000 or con_id = 1) and class < 1000
    

xa_end_total_count

Definition

The number of XA_END statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_end_total_count xa_end_total_count N/A

Calculation expression

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 (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 (30204) and (con_id > 1000 or con_id = 1) and class < 1000
    

xa_prepare_total_count

Definition

The number of XA_PREPARE statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_prepare_total_count xa_prepare_total_count N/A

Calculation expression

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) 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) and (con_id > 1000 or con_id = 1) and class < 1000
    

xa_commit_total_count

Definition

The number of XA_COMMIT statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_commit_total_count xa_commit_total_count N/A

Calculation expression

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) 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) and (con_id > 1000 or con_id = 1) and class < 1000
    

xa_rollback_total_count

Definition

The number of XA_ROLLBACK statements in an OceanBase Database tenant.

Description

Metric Metric name Unit
xa_rollback_total_count xa_rollback_total_count N/A

Calculation expression

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) 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) and (con_id > 1000 or con_id = 1) and class < 1000
    

Contact Us