Cursors

2025-07-25 03:35:59  Updated

This topic describes the monitoring metric Cursors within an OceanBase Database tenant. You can specify a statistical range to query statistics about the number of opened cursors cached in the sessions of a single zone or on a single OBServer of a tenant.

Definition

The number of opened cursors cached in sessions in the specified statistical range.

Description

Metric Metric name Unit
opened_cursors opened_cursors_count N/A

Calculation expression

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

Contact Us