Workload-Based Learning
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
**Summary and Architecture**
The Workload-Based Learning Optimizer introduces a new module in TiDB that leverages captured workload history to enhance the database query optimizer. By learning from historical data, this module helps the optimizer make smarter decisions, such as automatically binding queries when it encounters challenges selecting the optimal plan and evicting outdated cached plans for re-optimization. Additionally, it improves cardinality estimations by supplying actual data, refines the cost model through detailed execution information, prioritizes table costs for more efficient stats collection, and recommends indexes based on past execution plans. This development represents an important step toward a fully autonomous, learning-driven optimizer, with initial implementation focused on optimizing table cost prioritization. Beyond optimizing query performance, workload-based learning can also support database design advisors, such as those suggesting index improvements.

Contributor guide
Assessment
This issue has not been assessed yet.