pingcap/tidb

Accelerate FindColumn when table has huge number of columns

Open

#11,151 opened on Jul 9, 2019

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Go (6,186 forks)batch import
help wantedtype/enhancementtype/performance

Repository metrics

Stars
 (40,090 stars)
PR merge metrics
 (Avg merge 14d 4h) (346 merged PRs in 30d)

Description

Feature Request

Is your feature request related to a problem? Please describe:

will be frequently called when build query plan or build insert value list.

now it uses linear search to find column info match target name....

when the table has limitation columns it works well...

but when table got many columns (e.g. 200+ columns), upper logic will find 200 columns to do linear search in 200 items.

image

Describe the feature you'd like:

maybe we should adaptively replace a linear search with another method when table has many columns

Contributor guide