pingcap / pingcap/tidb

ddl: use max(approximate_size, approximate_kv_size) for add-index table size estimation

Open
#67,583 0 comments 0 reactions 0 assignees View on GitHub
component/ddl type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Feature Request\n\n**Is your feature request related to a problem? Please describe:**\n\nTiDB DDL add-index table size estimation currently depends on PD region size fields. When and diverge, using only one field can underestimate table size and affect resource/concurrency decisions.\n\n**Describe the feature you'd like:**\n\nUse per region in DDL table size estimation () to avoid underestimation.\n\n**Describe alternatives you've considered:**\n\n1. Prefer with fallback to when kv size is 0.\n2. Prefer only.\n\nBoth can underestimate when both fields are present but one is lower than the other.\n\n**Teachability, Documentation, Adoption, Migration Strategy:**\n\nNo SQL syntax or user-facing configuration changes. Behavior improvement is internal to DDL estimation and covered by targeted unit tests.

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.