diff --git a/docs/generated/metrics/metrics.html b/docs/generated/metrics/metrics.html
index e772a6531780..4d8f7d88dc8f 100644
--- a/docs/generated/metrics/metrics.html
+++ b/docs/generated/metrics/metrics.html
@@ -1561,6 +1561,10 @@
APPLICATION | sql.copy.nonatomic.started.count.internal | Number of non-atomic COPY SQL statements started (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.copy.started.count | Number of COPY SQL statements started | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.copy.started.count.internal | Number of COPY SQL statements started (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.crud_query.count | Number of SQL SELECT, INSERT, UPDATE, DELETE statements successfully executed | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.crud_query.count.internal | Number of SQL SELECT, INSERT, UPDATE, DELETE statements successfully executed (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.crud_query.started.count | Number of SQL SELECT, INSERT, UPDATE, DELETE statements started | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.crud_query.started.count.internal | Number of SQL SELECT, INSERT, UPDATE, DELETE statements started (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.ddl.count | Number of SQL DDL statements successfully executed | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.ddl.count.internal | Number of SQL DDL statements successfully executed (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.ddl.started.count | Number of SQL DDL statements started | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
@@ -1676,10 +1680,10 @@
APPLICATION | sql.pre_serve.mem.cur | Current memory usage for SQL connections prior to routing the connection to the target SQL server | Memory | GAUGE | BYTES | AVG | NONE |
APPLICATION | sql.pre_serve.mem.max | Memory usage for SQL connections prior to routing the connection to the target SQL server | Memory | HISTOGRAM | BYTES | AVG | NONE |
APPLICATION | sql.pre_serve.new_conns | Number of SQL connections created prior to routing the connection to the target SQL server | Connections | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
-APPLICATION | sql.query.count | Number of SQL queries executed | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
-APPLICATION | sql.query.count.internal | Number of SQL queries executed (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
-APPLICATION | sql.query.started.count | Number of SQL queries started | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
-APPLICATION | sql.query.started.count.internal | Number of SQL queries started (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.query.count | Number of SQL operations started including queries, and transaction control statements | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.query.count.internal | Number of SQL operations started including queries, and transaction control statements (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.query.started.count | Number of SQL operations started including queries, and transaction control statements | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
+APPLICATION | sql.query.started.count.internal | Number of SQL operations started including queries, and transaction control statements (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.restart_savepoint.count | Number of `SAVEPOINT cockroach_restart` statements successfully executed | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.restart_savepoint.count.internal | Number of `SAVEPOINT cockroach_restart` statements successfully executed (internal queries) | SQL Internal Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
APPLICATION | sql.restart_savepoint.release.count | Number of `RELEASE SAVEPOINT cockroach_restart` statements successfully executed | SQL Statements | COUNTER | COUNT | AVG | NON_NEGATIVE_DERIVATIVE |
diff --git a/pkg/sql/conn_executor.go b/pkg/sql/conn_executor.go
index ead2b0e60bc7..f9996e9ce514 100644
--- a/pkg/sql/conn_executor.go
+++ b/pkg/sql/conn_executor.go
@@ -4435,6 +4435,8 @@ type StatementCounters struct {
UpdateCount telemetry.CounterWithMetric
InsertCount telemetry.CounterWithMetric
DeleteCount telemetry.CounterWithMetric
+ // CRUDQueryCount includes all 4 CRUD statements above.
+ CRUDQueryCount telemetry.CounterWithMetric
// Transaction operations.
TxnBeginCount telemetry.CounterWithMetric
@@ -4499,6 +4501,8 @@ func makeStartedStatementCounters(internal bool) StatementCounters {
getMetricMeta(MetaInsertStarted, internal)),
DeleteCount: telemetry.NewCounterWithMetric(
getMetricMeta(MetaDeleteStarted, internal)),
+ CRUDQueryCount: telemetry.NewCounterWithMetric(
+ getMetricMeta(MetaCRUDStarted, internal)),
DdlCount: telemetry.NewCounterWithMetric(
getMetricMeta(MetaDdlStarted, internal)),
CopyCount: telemetry.NewCounterWithMetric(
@@ -4542,6 +4546,8 @@ func makeExecutedStatementCounters(internal bool) StatementCounters {
getMetricMeta(MetaInsertExecuted, internal)),
DeleteCount: telemetry.NewCounterWithMetric(
getMetricMeta(MetaDeleteExecuted, internal)),
+ CRUDQueryCount: telemetry.NewCounterWithMetric(
+ getMetricMeta(MetaCRUDExecuted, internal)),
DdlCount: telemetry.NewCounterWithMetric(
getMetricMeta(MetaDdlExecuted, internal)),
CopyCount: telemetry.NewCounterWithMetric(
@@ -4562,12 +4568,16 @@ func (sc *StatementCounters) incrementCount(ex *connExecutor, stmt tree.Statemen
sc.TxnBeginCount.Inc()
case *tree.Select:
sc.SelectCount.Inc()
+ sc.CRUDQueryCount.Inc()
case *tree.Update:
sc.UpdateCount.Inc()
+ sc.CRUDQueryCount.Inc()
case *tree.Insert:
sc.InsertCount.Inc()
+ sc.CRUDQueryCount.Inc()
case *tree.Delete:
sc.DeleteCount.Inc()
+ sc.CRUDQueryCount.Inc()
case *tree.CommitTransaction:
sc.TxnCommitCount.Inc()
case *tree.RollbackTransaction:
diff --git a/pkg/sql/exec_util.go b/pkg/sql/exec_util.go
index 55ce0f7652f3..057cf70cd005 100644
--- a/pkg/sql/exec_util.go
+++ b/pkg/sql/exec_util.go
@@ -833,7 +833,7 @@ var (
// Below are the metadata for the statement started counters.
MetaQueryStarted = metric.Metadata{
Name: "sql.query.started.count",
- Help: "Number of SQL queries started",
+ Help: "Number of SQL operations started including queries, and transaction control statements",
Measurement: "SQL Statements",
Unit: metric.Unit_COUNT,
}
@@ -885,6 +885,12 @@ var (
Measurement: "SQL Statements",
Unit: metric.Unit_COUNT,
}
+ MetaCRUDStarted = metric.Metadata{
+ Name: "sql.crud_query.started.count",
+ Help: "Number of SQL SELECT, INSERT, UPDATE, DELETE statements started",
+ Measurement: "SQL Statements",
+ Unit: metric.Unit_COUNT,
+ }
MetaSavepointStarted = metric.Metadata{
Name: "sql.savepoint.started.count",
Help: "Number of SQL SAVEPOINT statements started",
@@ -949,7 +955,7 @@ var (
// Below are the metadata for the statement executed counters.
MetaQueryExecuted = metric.Metadata{
Name: "sql.query.count",
- Help: "Number of SQL queries executed",
+ Help: "Number of SQL operations started including queries, and transaction control statements",
Measurement: "SQL Statements",
Unit: metric.Unit_COUNT,
}
@@ -1001,6 +1007,12 @@ var (
Measurement: "SQL Statements",
Unit: metric.Unit_COUNT,
}
+ MetaCRUDExecuted = metric.Metadata{
+ Name: "sql.crud_query.count",
+ Help: "Number of SQL SELECT, INSERT, UPDATE, DELETE statements successfully executed",
+ Measurement: "SQL Statements",
+ Unit: metric.Unit_COUNT,
+ }
MetaSavepointExecuted = metric.Metadata{
Name: "sql.savepoint.count",
Help: "Number of SQL SAVEPOINT statements successfully executed",
diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/overview.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/overview.tsx
index 3f5269e36faa..cf1c1795b8e8 100644
--- a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/overview.tsx
+++ b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/overview.tsx
@@ -30,12 +30,12 @@ export default function (props: GraphDashboardProps) {
return [
@@ -60,6 +60,11 @@ export default function (props: GraphDashboardProps) {
title="Deletes"
nonNegativeRate
/>
+
,
diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/sql.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/sql.tsx
index dcae25ab7407..424d21ba55a4 100644
--- a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/sql.tsx
+++ b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/sql.tsx
@@ -137,12 +137,12 @@ export default function (props: GraphDashboardProps) {
,
@@ -166,6 +166,11 @@ export default function (props: GraphDashboardProps) {
title="Deletes"
nonNegativeRate
/>
+
,
diff --git a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/summaryBar.tsx b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/summaryBar.tsx
index ae924b08b8f3..c627352b74e4 100644
--- a/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/summaryBar.tsx
+++ b/pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/summaryBar.tsx
@@ -10,7 +10,7 @@ import { useSelector } from "react-redux";
import { Link } from "react-router-dom";
import { createSelector } from "reselect";
-import { Tooltip, Anchor } from "src/components";
+import { Anchor, Tooltip } from "src/components";
import { nodeStatusesSelector, nodeSumsSelector } from "src/redux/nodes";
import { howAreCapacityMetricsCalculated } from "src/util/docs";
import { EventBox } from "src/views/cluster/containers/events";
@@ -18,11 +18,11 @@ import { Metric } from "src/views/shared/components/metricQuery";
import {
SummaryBar,
SummaryLabel,
+ SummaryMetricsAggregator,
SummaryMetricStat,
SummaryStat,
SummaryStatBreakdown,
SummaryStatMessage,
- SummaryMetricsAggregator,
} from "src/views/shared/components/summaryBar";
/**
@@ -145,28 +145,7 @@ export default function (props: ClusterSummaryProps) {
>
-
-
-