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

Provide a fix control switch to fix overestimation of index scan of inner side of index join #44855

Closed
time-and-fate opened this issue Jun 21, 2023 · 0 comments · Fixed by #44865
Assignees
Labels
affects-6.5 affects-7.1 sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@time-and-fate
Copy link
Member

time-and-fate commented Jun 21, 2023

Background

In some cases, tidb will produce an extremely high estimation for the IndexRangeScan under the inner side of an IndexJoin. In #41996 we resolved this.

But we reverted this change in #42362 because in an internal workload, it caused execution plan regression. As explained in #42362, it's not because something incorrect in #41996, but better estimation for one operator doesn't guarantee a better execution plan as a whole.

However, this improvement is important in some scenarios, and we want to make users able to use it when it's necessary. So we plan to add this to tidb_opt_fix_control.

Usage

-- session level
set @@tidb_opt_fix_control = '44855:ON';
-- global level
set global tidb_opt_fix_control = '44855:ON';
@time-and-fate time-and-fate added type/enhancement The issue or PR belongs to an enhancement. sig/planner SIG: Planner labels Jun 21, 2023
@time-and-fate time-and-fate self-assigned this Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.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