pingcap/tidb

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

Open

#12,723 opened on 2019年10月15日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)Go (40,090 stars) (6,186 forks)batch import
help wantedsig/executiontype/enhancementtype/performance

説明

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:

コントリビューターガイド