-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Support OFFSET in SELECT #2661
Comments
We can add this, but performing pagination using this method is extremely inefficient, especially for an analytic database like Presto that often has to perform a full table or partition scan. Additionally, the results will not necessarily be consistent between queries, so you can have duplicate or missing results when navigating between pages. It is better for the application to cache the result set and perform pagination itself using the cached data. Here is a good article on the subject: http://use-the-index-luke.com/no-offset |
Thanks. Definitely agree it's a better solution and have dealt with similar solutions on other platforms. We're working behind a legacy interface that allows arbitrary pagination, so that gives us some challenges using the stated approach. We've got some workarounds planned for now until we can rework the interface. Cheers. |
Hi @jcowanpdx , |
For the record, the standard syntax is:
|
I really I'd like to hear what's the best recommendation around that. I'm using AWS Athena which I suppose is backed by PrestoDB under the hood, and I'm needing a mechanism to do this sort of pagination, the tricky thing is that my CSV format by itself doesn't include a sequential field like an Including the |
This issue has been automatically marked as stale because it has not had any activity in the last 2 years. If you feel that this issue is important, just comment and the stale tag will be removed; otherwise it will be closed in 7 days. This is an attempt to ensure that our open issues remain valuable and relevant so that we can keep track of what needs to be done and prioritize the right things. |
LIMIT is supported. Is it possible to add OFFSET as well? I understand I can do that manually but having native support would be nice. The downside of manual paging is more data transmitted over the wire from server to client.
The text was updated successfully, but these errors were encountered: