Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pruning the plan branches with dual tables. #25234

Open
hanfei1991 opened this issue Jun 8, 2021 · 0 comments
Open

Pruning the plan branches with dual tables. #25234

hanfei1991 opened this issue Jun 8, 2021 · 0 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. sig/planner SIG: Planner type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@hanfei1991
Copy link
Member

Feature Request

In optimizer, it will replace a forever-empty table (like table scan with a constant false) with a "dual" table. This opt can save the rpc calls to TiKV or TiFlash engine. But this opt still miss some cases, there are two opts that're worthy to do:

  • inner/semi join with dual table. In this case, we can replace inner join with dual table 'cause the result of join is empty too. Moreover, it can save the i/o scan greatly.
  • union all/outer join with dual. In the mpp settings, an operator involved with dual table will block pushing down. Some operators that can run on TiFlash would have to run on TiDB. We have optimize the union all cases, but more need to be done.

Besides, TiFlash should also need to support dual in order to solve corner cases, such as outer join dual tables.

@hanfei1991 hanfei1991 added the type/feature-request Categorizes issue or PR as related to a new feature. label Jun 8, 2021
@hanfei1991 hanfei1991 changed the title Prune the dual table Pruning the plan branches with dual tables. Jun 8, 2021
@winoros winoros self-assigned this Jun 8, 2021
@winoros winoros added sig/planner SIG: Planner help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. sig/planner SIG: Planner type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants