This topic describes the performance metric TPS within an OceanBase Database tenant. TPS indicates the number of transactions processed per second in an OceanBase Database tenant. TPS consists of the following two sub-metrics: transaction_single_partition_count that indicates the number of general transactions processed per second, and transaction_multi_partition_count that indicates the number of distributed transactions processed per second in a tenant. You can specify a statistical period to query statistics about the TPS metric in a single zone or on a single OBServer of an OceanBase Database tenant.
transaction_single_partition_count
Definition
The number of general transactions processed per second in an OceanBase Database tenant.
Metric
| Metric | Metric name | Unit |
|---|---|---|
| transaction_single_partition_count | transaction_single_partition_count | N/A |
Calculation expression
sum(rate(ob_sysstat{stat_id="30012",@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 (30012) and (con_id > 1000 or con_id = 1) and class < 1000If 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 (30012) and (con_id > 1000 or con_id = 1) and class < 1000
transaction_multi_partition_count
Definition
The number of distributed transactions processed per second in an OceanBase Database tenant.
Metric
| Metric | Metric name | Unit |
|---|---|---|
| transaction_multi_partition_count | transaction_multi_partition_count | N/A |
Calculation expression
sum(rate(ob_sysstat{stat_id="30013",@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 (30013) and (con_id > 1000 or con_id = 1) and class < 1000If 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 (30013) and (con_id > 1000 or con_id = 1) and class < 1000