-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Faulty pagination in ordered query with over 1024 results #42816
Comments
So I'm unsure about v19.2.0 because I can reproduce the above on v19.2.0, however going back to v19.2.0 did fix our production issues... |
Thanks for the report. I would guess this is a bug in the new vectorized engine. Does it reproduce after you type Please share the plan with |
I was able to reproduce this without trouble and confirmed that it doesn't repro with vectorized off. |
|
|
Oh, that's concerning. Looking into it. As a side note, I think "waiting a little bit" is for statistics to be populated so that with |
Describe the problem
In v19.2.1 the pagination on an ordered query continues from top after 1024 results whenever a LIMIT is set.
So, a query with
OFFSET 1024
will return all results starting from the 1025th till the end (as expected), but as soon as I introduce aLIMIT
of any size, the first returned result will be the first as if I had no offset. Sorting DESC makes things worse...The problem does not appear right away, but takes a minute or so to manifest for new data.
To Reproduce
Wait. The problem only appears after about a minute or so.
Run following queries:
Note: Downgrading to v19.2.0 makes the problem go away.
Expected behavior
I would expect ordered result sets to not jump to some other values...
Environment:
Additional context
This is the "secure" 3-node CockroachDB cluster on Kubernetes.
The text was updated successfully, but these errors were encountered: