-
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
Duplicated ORDER BY condition causes bad execution plan #20322
Labels
Comments
Integrity check: Please comment /info to get template |
Please edit this comment to complete the following informationBug1. Root Cause Analysis (RCA)duplicated 2. Symptomthe execution plan is changed when adding another same order by item:
3. All Trigger Conditionsthere are duplicated expressions in the select id
from t1
where id > 10
order by id asc,
id asc
limit 5; 4. Workaround (optional)remove the duplicated 5. Affected versions[v3.0.0:v3.0.19], [v4.0.0:v4.0.7] 6. Fixed versionsv4.0.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
These should generate the same execution plan since the items in the ORDER BY clause are redundant.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: