This topic describes monitoring metrics related to the average response time for each SQL statement in an OBProxy cluster. The response time refers to the period from the time when an OBProxy cluster forwards an SQL statement to the time when the OBProxy cluster receives a response from an OBServer.
commit
Definition
The average time consumed in forwarding a COMMIT request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| commit | request_cost_commit | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="total",sqltype="COMMIT", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{sqltype="COMMIT", @LABELS}[@INTERVAL])) by (@GBLABELS)
delete
Definition
The average time consumed in forwarding a DELETE request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| delete | request_cost_delete | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="total",sqltype="DELETE", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{sqltype="DELETE", @LABELS}[@INTERVAL])) by (@GBLABELS)
insert
Definition
The average time consumed in forwarding an INSERT request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| insert | request_cost_insert | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="total",sqltype="INSERT", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{sqltype="INSERT", @LABELS}[@INTERVAL])) by (@GBLABELS)
prepare_send_request
Definition
The average time consumed in preparing for sending a request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| prepare_send_request | request_cost_prepare_send_request_time | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="prepare", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{@LABELS}[@INTERVAL])) by (@GBLABELS)
server_process_request
Definition
The average time consumed by the OBServer in processing a request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| server_process_request | request_cost_server_process_request_time | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="server", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{@LABELS}[@INTERVAL])) by (@GBLABELS)
select
Definition
The average time consumed in forwarding a SELECT request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| select | request_cost_select | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="total",sqltype="SELECT", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{sqltype="SELECT", @LABELS}[@INTERVAL])) by (@GBLABELS)
sequence
Definition
The average time consumed in forwarding a SEQUENCE request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| sequence | request_cost_sequence | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="total",sqltype="SEQUENCE", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{sqltype="SEQUENCE", @LABELS}[@INTERVAL])) by (@GBLABELS)
update
Definition
The average time consumed in forwarding an UPDATE request.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| update | request_cost_update | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{timeType="total",sqltype="UPDATE", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{sqltype="UPDATE", @LABELS}[@INTERVAL])) by (@GBLABELS)
others
Definition
The average time consumed in forwarding other requests.
Description
| Metric | Metric field name | Unit |
|---|---|---|
| others | request_cost_others | Milliseconds |
Calculation expression
sum(rate(odp_sql_cost_total{sqltype="OTHERS", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(odp_sql_request_total{sqltype="OTHERS", @LABELS}[@INTERVAL])) by (@GBLABELS)