You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
151689: sql: add routine statement counters for tracking execution metrics r=ZhouXing19 a=ZhouXing19
Informs #151173
This commit introduces the following metrics for statements got executed via calling a store procedure or executing a routine:
- sql_routine_select_started_count
- sql_routine_update_started_count
- sql_routine_insert_started_count
- sql_routine_delete_started_count
- sql_routine_select_count
- sql_routine_update_count
- sql_routine_insert_count
- sql_routine_delete_count
The metrics with `started` are for statement that started execution, including those might error during execution. The ones without `started` are those successfully executed.
Like the existing counters for sql statements (e.g. sql_select_count), it increments before the changes is committed or aborted in an explicit transaction.
These counters are global, as in, calling different routines (i.e. UDF/SPs) will eventually aggregate to the same counter.
Release note (sql change): This commit introduces the following metrics for statements got executed via calling a store procedure: sql_routine_select_started_count, sql_routine_update_started_count,sql_routine_insert_started_count, sql_routine_delete_started_count,sql_routine_select_count,sql_routine_update_count,sql_routine_insert_count,sql_routine_delete_count.
Co-authored-by: ZhouXing19 <zhouxing@uchicago.edu>
Copy file name to clipboardExpand all lines: docs/generated/metrics/metrics.yaml
+160Lines changed: 160 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -571,6 +571,166 @@ layers:
571
571
derivative: NON_NEGATIVE_DERIVATIVE
572
572
how_to_use: The rate of this metric shows how frequently new connections are being established. This can be useful in determining if a high rate of incoming new connections is causing additional load on the server due to a misconfigured application.
description: Number of SQL DELETE statements successfully executed within routine invocation
578
+
y_axis_label: SQL Statements
579
+
type: COUNTER
580
+
unit: COUNT
581
+
aggregation: AVG
582
+
derivative: NON_NEGATIVE_DERIVATIVE
583
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
description: Number of SQL DELETE statements started within routine invocation
598
+
y_axis_label: SQL Statements
599
+
type: COUNTER
600
+
unit: COUNT
601
+
aggregation: AVG
602
+
derivative: NON_NEGATIVE_DERIVATIVE
603
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
description: Number of SQL INSERT statements successfully executed within routine invocation
618
+
y_axis_label: SQL Statements
619
+
type: COUNTER
620
+
unit: COUNT
621
+
aggregation: AVG
622
+
derivative: NON_NEGATIVE_DERIVATIVE
623
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
description: Number of SQL INSERT statements started within routine invocation
638
+
y_axis_label: SQL Statements
639
+
type: COUNTER
640
+
unit: COUNT
641
+
aggregation: AVG
642
+
derivative: NON_NEGATIVE_DERIVATIVE
643
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
description: Number of SQL SELECT statements successfully executed within routine invocation
658
+
y_axis_label: SQL Statements
659
+
type: COUNTER
660
+
unit: COUNT
661
+
aggregation: AVG
662
+
derivative: NON_NEGATIVE_DERIVATIVE
663
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
description: Number of SQL SELECT statements started within routine invocation
678
+
y_axis_label: SQL Statements
679
+
type: COUNTER
680
+
unit: COUNT
681
+
aggregation: AVG
682
+
derivative: NON_NEGATIVE_DERIVATIVE
683
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
description: Number of SQL UPDATE statements successfully executed within routine invocation
698
+
y_axis_label: SQL Statements
699
+
type: COUNTER
700
+
unit: COUNT
701
+
aggregation: AVG
702
+
derivative: NON_NEGATIVE_DERIVATIVE
703
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
description: Number of SQL UPDATE statements started within routine invocation
718
+
y_axis_label: SQL Statements
719
+
type: COUNTER
720
+
unit: COUNT
721
+
aggregation: AVG
722
+
derivative: NON_NEGATIVE_DERIVATIVE
723
+
how_to_use: This high-level metric reflects workload volume. Monitor this metric to identify abnormal application behavior or patterns over time. If abnormal patterns emerge, apply the metric's time range to the SQL Activity pages to investigate interesting outliers or patterns. For example, on the Transactions page and the Statements page, sort on the Execution Count column. To find problematic sessions, on the Sessions page, sort on the Transaction Count column. Find the sessions with high transaction counts and trace back to a user or application.
0 commit comments