pingcap / pingcap/tidb

planner: the cost model considers offload and cache-miss for TiDB serverless

Open
#48,780 0 comments 0 reactions 0 assignees View on GitHub
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).
image

Pasted Graphic 1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.