Add executor runtime info for explain for connection
statement
#18233
Labels
feature/accepted
This feature request is accepted by product managers
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
sig/execution
SIG execution
type/feature-request
Categorizes issue or PR as related to a new feature.
This is a subtask of #17692
background
Currently, you can use
explain for connection
statement to check the plan information of the running sql, such as below:Feature Request
Add executor runtime info for
explain for connection
statement, such as below:Actually the upper result it the result of
explain analyze xxx
.Currently, TiDB doesn't collect the executor runtime information by default, but you can enable it by set the variable:
Then TiDB will record the executor runtime information in the
StatementContext.RuntimeStatsColl
of the session. So you can add this runtime information inexplain for connection
statement.Describe alternatives you've considered:
We can refer to the implementation of
ExplainExec.generateExplainInfo
, to avoid duplicate code.Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: