pingcap/tidb

shortcut for selection's execution when its filter contain correlated filter.

Open

#12.723 aperta il 15 ott 2019

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Go (6186 fork)batch import
help wantedsig/executiontype/enhancementtype/performance

Metriche repository

Star
 (40.090 star)
Metriche merge PR
 (Merge medio 14g 4h) (346 PR mergiate in 30 g)

Descrizione

Feature Request

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

For normal selection not involved in Apply. The constant filter will be evaled during planning. So if one filter would filter out all data, it will be converted to TableDual during planning. But if there's correlated column in filters, we would eval it in execution phase. Though it atually behaves like a constant in execution phase.

Describe the feature you'd like:

We could split the filters to two part and one part only contains filters containing constant and correlated column. Then when calling the Next of SelectionExec for the first time. We eval these filters once. If it's false. Then we can break the execution early.

Describe alternatives you've considered:

Currently, no

Teachability, Documentation, Adoption, Migration Strategy:

Guida contributor