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

use SEMI_JOIN_REWRITE to control the exists/in's behavior #35323

Closed
winoros opened this issue Jun 13, 2022 · 0 comments · Fixed by #35325
Closed

use SEMI_JOIN_REWRITE to control the exists/in's behavior #35323

winoros opened this issue Jun 13, 2022 · 0 comments · Fixed by #35325
Assignees
Labels
affects-6.1 sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@winoros
Copy link
Member

winoros commented Jun 13, 2022

Enhancement

Previously, we have the session variable tidb_opt_insubq_to_join_and_agg to control the in subquery's behavior. But the variable is not very suitable for SPM.

And that variable only controls the IN subquery. It doesn't handle the EXISTS because we need to decorrelated first then check whether we can rewrite the semi join.

This time, we introduce the hint to control its behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants