pingcap / pingcap/tidb

Optimize the num of stats load items for large SQL and wide table

Open
#54,883 0 comments 0 reactions 0 assignees View on GitHub
component/statistics sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
After the collecting of predicate columns becomes the default, we can change the way to decide which columns' statistics need to be loaded.

The columns that come from the WHERE clause need to read their full stats(NDV, histogram, topn). The columns that come from JOIN keys/group-by clause/order-by/partition-by only need their NDV information.

So we can reduce the size of the stats objects that we need to load to memory.

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.