Support query execution info for running SQLs (Live execution plan)
#17.692 aperta il 4 giu 2020
Metriche repository
- Star
- (40.090 star)
- Metriche merge PR
- (Merge medio 14g 4h) (346 PR mergiate in 30 g)
Descrizione
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.