pingcap/tidb

Support query execution info for running SQLs (Live execution plan)

Open

#17,692 opened on 2020年6月4日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)Go (6,186 forks)batch import
feature/acceptedhelp wantedsig/executiontype/feature-request

Repository metrics

Stars
 (40,090 stars)
PR merge metrics
 (平均マージ 14d 4h) (30d で 346 merged PRs)

説明

Feature Request

Is your feature request related to a problem? Please describe:

A SQL query may be running for long time. Until it is finished, currently we have absolute no way to know what happened to it.

Describe the feature you'd like:

Provide a way to query current execution details for running SQLs. This feature is similar to the Live Query Statistics in the SQL server. SQL server allows to view live execution plan for any queries.

Execution details includes:

  • Each executor (include TiKV) iterations, processed rows, process time, etc.
  • Executor state (finished / running)
  • TiDB and TiKV specific metrics like elapsed total Coprocessor wait time, number of backoff and so on.
  • Tasks detail, like inflight Coprocessor tasks, finished Coprocessor tasks

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

For performance considerations, the execution details doesn't need to be updated in real-time, e.g. it can be updated each several batch iteration (or time elapsed).

As the first stage, we don't need to touch TiKV, leaving execution info related to TiKV being updated by each TiKV request.

コントリビューターガイド