pingcap/tidb

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

Open

#12.723 aberto em 15 de out. de 2019

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Go (6.186 forks)batch import
help wantedsig/executiontype/enhancementtype/performance

Métricas do repositório

Stars
 (40.090 stars)
Métricas de merge de PR
 (Mesclagem média 14d 4h) (346 fundiu PRs em 30d)

Description

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:

Guia do colaborador