TiDB Query Insight Logging
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Currently there are three types of TiDB query logging: slow query log, general log and audit log.
General logs keeps the general information within query execution context, e.g. username, connection id, startTs, forUpdateTs, schemaVersion, etc.
Slow query log keeps all information within general log, as well as query level performance related metrics, e.g. # of mvcc version being scanned, # of rows actually read, lock wait time, TiKV cpu time etc.
Audit log is out of scope here so won't be discussed.
We hope to understand the query performance better and predict of query impacts under organic data growth, thus we are hoping to have query metrics in slow queries logged for all queries for data analysis.
Contributor guide
Assessment
This issue has not been assessed yet.