`Recommend Index` statements may be slow and can't be killed
Open
affects-8.5
report/customer
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
In a `Recommend Index` statement, for all related DBs in the queries, it will fetch all the table metadata in those DBs. When there are a lot of queries (1000 by default) or the user has lots of tables, this process costs many resources and time, especially with infoschema v2 now.
What's worse, during this process, there is no checkpoint for the timeout option or `kill` signal, so the user is not able to `kill` it, and the timeout option is also ineffective.
Contributor guide
Assessment
This issue has not been assessed yet.