pingcap/tidb

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

Open

#17,692 创建于 2020年6月4日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Go (6,186 fork)batch import
feature/acceptedhelp wantedsig/executiontype/feature-request

仓库指标

Star
 (40,090 star)
PR 合并指标
 (平均合并 14天 4小时) (30 天内合并 346 个 PR)

描述

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.

贡献者指南