-
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
further improvement of pagination query #57694
Comments
it's a bit trickier than that, the optimizer should see that it can pushdown all three where clauses down to the tikv layer and scan fewer rows. for example, the query below is also problematic
|
I simplified the problem to the test below. The problem is that the optimizer is picking point ranges on b1 in ( 44, 70, 76) and not intersecting it with the (t1.b1 > 70 OR (t1.b1 = 70 AND t1.a1 > 41)). The optimal result should be the index range (b1=76) OR (b1=70 AND a1>41). This should be covered by the enhancement made by #54166. However, the test shows it is not working and should be fixed as a follow up of 54166.
|
I have a fix that extends the scope of #54166
|
customer has a query similar to #56005, but more complicated. In #56005, the query is:
Now the query is
The optimizer should see that there is no need to scan index for it.a = "a".
The text was updated successfully, but these errors were encountered: