Improve sql statement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
TiDB's statement_summary groups execution statistics by (schema, digest, prev_digest, plan_digest,
resource_group) and merges all users who ran the same normalized SQL into a single record's AuthUsers
set. Operators want to:
1. Per-user isolation — distinguish how the same SQL behaves for different users (multi-tenant
visibility, avoid one heavy user dominating a digest row, enable per-user quota / auditing work built
on top of INFORMATION_SCHEMA.STATEMENTS_SUMMARY).
2. Observability of evicted data — today, when the LRU evicts a row it is silently folded into an
"other" aggregate. Under high-cardinality workloads this hides data. They want evicted records also
written to the stmt log (v2 persistence mode) while keeping the hot path cheap.
Both changes must be configurable and off-by-default to avoid breaking existing deployments
Contributor guide
Assessment
This issue has not been assessed yet.