pingcap / pingcap/tidb

TiDB Query Insight Logging

Open
#46,733 1 comment 0 reactions 0 assignees View on GitHub
type/enhancement
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

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.