-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
optimizer may make bad decisions due to pseudo stats during init stats #43385
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
component/statistics
severity/major
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Comments
Merged
12 tasks
The behavior affects a lot. But we only want to solve problem with TiDB no less than 7.1-LTS |
We decide to port the config setting to v6.5. |
This was referenced Apr 26, 2023
17 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
component/statistics
severity/major
sig/planner
SIG: Planner
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Here is a small example to demonstrate the issue.
I add
time.Sleep(20 * time.Minute)
into(*Handle).InitStats
to simulate slow init stats.Then restart the tidb-server.
2. What did you expect to see? (Required)
We hope the optimizer avoids using pseudo stats to make decisions. For example, tidb can choose to wait for init stats to finish before providing service.
3. What did you see instead (Required)
The optimizer uses pseudo stats during init stats, which may lead to bad plans.
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: