planner: add cost calculation model for optimize tracer
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
### What problem does this PR solve?
Problem Summary:
Optimize tracer need formula for plan cost calculation, and current plan cost calculate the value directly and give the formula in other place, if the cost calculation get changed, we should change the value calculation and formula at the same time.
### What is changed and how it works?
This PR implements a cost calculation model and it can generate formula while doing value calculation, so it should be friendly for maintenance.
The detail information can refer the document below:
https://fy8qu3gpnk.feishu.cn/docx/BORKd8VNzo67Pux3f67c3guInAd
### Check List
Tests
- [x] Unit test
- [ ] Integration test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No code
Side effects
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Breaking backward compatibility
Documentation
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility
Contributor guide
Assessment
This issue has not been assessed yet.