cockroachdb / cockroachdb/cockroach

sql/stats: add metrics for stats staleness

Open
#171,709 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.