-
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
planner: regression index merge UNION case from v7.3.0 to v7.4.0 and master #48588
Comments
#46619 in this pr we lift the limitation of generate valid cop task for intersection index merge case. Explaination: First:condition
Note that, the final Index Merge is AND/Intersection mode. The alternative path for OR/UNION is also generated. Second:the cost compare problem, in the function
COP-Intersection's table side is not pure table scan, it has selection of entire OR tree, so we mark indexPlanFinished as true in On the contrary, COP-Union's table side is pure table scan, so we mark indexPlanFinished as false in The direct result will cause COP-Intersection win the COP-UNION in current ds.convertToIndexMergeScan() Third:so for COP type, the datasource only memorize the COP-Intersection as it's best, for ROOT type, the datasource give the plan which has limit append on the index merge reader which is seen in the non-expected plan shown in the pr description above. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: