cockroachdb / cockroachdb/cockroach
Show exact timestamps for Statement Fingerprint metrics
- 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.**
This is an extension of other feature requests around increasing granularity for looking into queries in the SQL Activity page, so that users are able to look into seconds-long intervals to see what fingerprints appear, rather than on hour-long boundaries as is currently possible. The same granularity is needed within the Statement Fingerprint statistics.
**Describe the solution you'd like**
When clicking into a Statement Fingerprint, there are further metrics such as Execution Count, Statement Times, Execution Retries, Rows Processed, and Contention Time. The feature requests for each of these are as below:
- Statement Times, Execution Count, Execution Retries, Contention Time: Better granularity. The bars on these bar graphs only exist on hour-long boundaries. In the screenshot below, this query ran 90k times over the 3 hour period. According to the Execution Count graph, ~45k of these occurred exactly at 14:00 UTC, ~44k at exactly 15:00 UTC, and ~1k more at exactly 16:00 UTC. We know that the insert workload was more distributed across the minutes between these hours, but our granularity does not allow us to display that.
- Rows processed. At each hour boundary (14:00. 15:00, 16:00, etc), we see the bar register 1 row processed. Does this mean that every insert on average processed one row? Or is it a raw count of the unique rows that were impacted by all 90k inserts during this timeframe? It's unclear based on how the metrics are presented today.
**Describe alternatives you've considered**
There is no alternative, unless the user/operator decides to run their own SQL statistics tracking/ingestion service and displays these via something like grafana. The information contained within the Statement Fingerprint view would be very useful to operators/users/field engineers/support engineers, but is not granular enough to be useful.
**Additional context**
sanitized screenshot linked in Jira
Jira issue: CRDB-26093
Contributor guide
Assessment
This issue has not been assessed yet.