cockroachdb / cockroachdb/cockroach
Overlay SQL statistics over SQL Statements graph
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
A common difficulty in troubleshooting is being able to do workload discovery in relation to the metrics that you see in your Metrics dashboards.
**Describe the solution you'd like**
Right now we have the SQL statements graph, which shows a breakdown of the queries being ingested by the cluster, broken down by select, inserts, and deletes. Ideally, we would be able to go further with this data - when I hover over a particular period of time, I would be able to see the actual SQL statement fingerprints being run at that time as they appear in the SQL Activity page, down to the second or even 5 or 10-second interval.
This would give us an exact view of the queries that were being run at any particular moment in time, which we can use to correlate with other metrics in the cluster. For example, if I see a change in the queries being run at the time that a large spike in CPU consumption, I can isolate the root cause of the CPU spike to a change in workload or a particular query that gets run.
Ideally, this could be extended to all graphs in the Metrics dashboards. Right now, hovering over any graph shows you the timestamp for that point in time, and the exact value for the y-axis for that point in time. Being able to toggle on something like "query discovery" that instead makes my cursor display timestamp and a SQL query breakdown by fingerprint would be useful.
**Describe alternatives you've considered**
Alternatives at the moment range depending on the symptom being discussed. The CPU point made above is addressed today by getting a CPU profile at the time CPU is high (this becomes complicated and difficult for short, unpredictable spikes) and associated CPU profile investigation. For general discovery into what a workload is doing at any particular time, we look at the SQL Activity dashboard for the same timeframe as the metrics period we're looking at (this is complicated by not being able to be more granular than an hour-long time period with the SQL Activity metrics).
Contributor guide
Assessment
This issue has not been assessed yet.