planner: the cost model considers offload and cache-miss for TiDB serverless
Open
epic/cost-model
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Large random data access to big tables on TiDB serverless may incur loads of cache-miss. Then the cloud storage engine needs to load the corresponding data from remote cloud storage like S3, which may slow down the query execution significantly.
The current cost model doesn't consider it, which may lead to wrong plans, just like the case below, the optimizer chose an `IndexJoin + IndexLookup` plan (6mins) instead of a MPP plan (around 30s).
Contributor guide
Assessment
This issue has not been assessed yet.