Request waiting queue

2025-07-25 06:10:58  Updated

This topic describes monitoring metrics related to the Request waiting queue within an OceanBase Database tenant. These metrics are enqueue_count and dequeue_count. You can specify a statistical period to query statistics about the Request waiting queue in a single zone or on a single OBServer of an OceanBase Database tenant.

enqueue_count

Definition

The average number of SQL statements that are added to the queue per second in the specified statistical period.

Description

Metric Metric field name Unit
enqueue_count request_enqueue_count times/s

Calculation expression

sum(rate(ob_sysstat{stat_id="20000",@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 (20000) 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 (20000) and (con_id > 1000 or con_id = 1) and class < 1000
    

dequeue_count

Definition

The average number of SQL statements that are removed from the queue per second in the specified statistical period.

Description

Metric Metric field name Unit
dequeue_count request_queue_count times/s

Calculation expression

sum(rate(ob_sysstat{stat_id="20001",@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 (20001) 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 (20001) and (con_id > 1000 or con_id = 1) and class < 1000
    

Contact Us