cockroachdb / cockroachdb/cockroach
sql/stats: add metrics for stats staleness
Open
A-sql-table-stats
C-enhancement
O-postmortem
P-3
T-sql-queries
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
We now report the `stats collected xxx ago` line in the output of EXPLAIN ANALYZE but don't have the metrics for such staleness. Such metrics can better signal for a timely stats re-collection.
https://github.com/cockroachdb/cockroach-private/blob/f6170135c54ba1a636932a4237e9f71079aaaaba/pkg/sql/opt/exec/explain/emit.go#L689-L691
Jira issue: CRDB-64833
Contributor guide
Assessment
This issue has not been assessed yet.