Response time

2024-07-30 09:31:29  Updated

This topic describes performance metrics related to the response time of SQL statements within an OceanBase Database tenant. The response time is the time consumed by the OBServer in processing a single SQL statement. To be specific, the response time refers to the period from the time when the OBServer receives an SQL statement to the time when the SQL statement is executed. You can specify a statistical period to query statistics about the response time of SQL statements within a tenant in a single zone or on a single OBserver.

all

Definition

The average time consumed by the OBServer in processing each SQL statement.

Description

Metric Metric field name Unit
all sql_all_rt ms

Calculation expression

(sum(rate(ob_sysstat{stat_id=“40001”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40003”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40005”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40007”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40009”,@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id=“40019”,@LABELS}[@INTERVAL])) by (@GBLABELS)) / (sum(rate(ob_sysstat{stat_id=“40000”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40002”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40004”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40006”,@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id=“40008”,@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id=“40018”,@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 (40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40018, 40019) 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 (40000, 40001, 40002, 40003, 40004, 40005, 40006, 40007, 40008, 40009, 40018, 40019) and (con_id > 1000 or con_id = 1) and class < 1000
    

select

Definition

The average time consumed by the OBServer in processing each SELECT statement.

Description

Metric Metric field name Unit
select sql_select_rt ms

Calculation expression

sum(rate(ob_sysstat{stat_id=“40001”,@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id=“40000”,@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 (40000, 40001) 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 (40000, 40001) and (con_id > 1000 or con_id = 1) and class < 1000
    

insert

Definition

The average time consumed by the OBServer in processing each INSERT statement.

Description

Metric Metric field name Unit
insert sql_insert_rt ms

Calculation expression

sum(rate(ob_sysstat{stat_id=“40003”,@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id=“40002”,@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 (40002, 40003) 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 (40002, 40003) and (con_id > 1000 or con_id = 1) and class < 1000
    

update

Definition

The average time consumed by the OBServer in processing each UPDATE statement.

Description

Metric Metric field name Unit
update sql_update_rt ms

Calculation expression

sum(rate(ob_sysstat{stat_id=“40007”,@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id=“40006”,@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 (40006, 40007) 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 (40006, 40007) and (con_id > 1000 or con_id = 1) and class < 1000
    

replace

Definition

The average time consumed by the OBServer in processing each REPLACE statement.

Description

Metric Metric field name Unit
replace sql_replace_rt ms

Calculation expression

sum(rate(ob_sysstat{stat_id=“40005”,@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id=“40004”,@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 (40004, 40005) 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 (40004, 40005) and (con_id > 1000 or con_id = 1) and class < 1000
    

delete

Definition

The average time consumed by the OBServer in processing each DELETE statement.

Description

Metric Metric field name Unit
delete sql_delete_rt ms

Calculation expression

sum(rate(ob_sysstat{stat_id=“40009”,@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id=“40008”,@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 (40008, 40009) 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 (40008, 40009) and (con_id > 1000 or con_id = 1) and class < 1000
    

other

Definition

The average time consumed by the OBServer in processing each of other statements such as data definition language (DDL), data control language (DCL), and data transaction language (DTL) statements.

Description

Metric Metric field name Unit
other sql_other_rt ms

Calculation expression

sum(rate(ob_sysstat{stat_id=“40019”,@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id=“40000”,@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 (40000, 40019) 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 (40000, 40019) and (con_id > 1000 or con_id = 1) and class < 1000
    

Contact Us