planner: support auto-eviction for plan-cache
Open
epic/plan-cache
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
The current plan cache has risks that may cache some bad plans(e.g. https://github.com/pingcap/tidb/issues/38533), to alleviate this problem, we can introduce some auto-eviction rules.
For example, introduce a time threshold and let the optimize evict a plan if its execution time exceeds that threshold.
Contributor guide
Assessment
This issue has not been assessed yet.