Skip to content
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

Slow Queries for Pagination with Using Limit / Offset in Large Sets #182

Open
michaelhiiva opened this issue Apr 20, 2021 · 0 comments
Open
Labels
bug Bugs in our AGAGD system. enhancement
Milestone

Comments

@michaelhiiva
Copy link
Contributor

Summary of the Bug

@duckpunch
#180 (comment)

What's the rough size of the largest thing we'll pass in? LIMIT/OFFSET can be pretty slow, right?

Specifically the issue with performing large queries on large sets.
https://docs.djangoproject.com/en/3.2/ref/paginator/#django.core.paginator.Paginator.object_list

If you’re using a QuerySet with a very large number of items, requesting high page numbers might be slow on some databases, because the resulting LIMIT/OFFSET query needs to count the number of OFFSET records which takes longer as the page number gets higher.

Notes

@michaelhiiva michaelhiiva added bug Bugs in our AGAGD system. enhancement labels Apr 20, 2021
@michaelhiiva michaelhiiva added this to the Redesign milestone Apr 20, 2021
@michaelhiiva michaelhiiva changed the title Slow Queries for Pagination with Using Limit / Offset Slow Queries for Pagination with Using Limit / Offset in Large Sets Apr 20, 2021
@michaelhiiva michaelhiiva self-assigned this Apr 20, 2021
@michaelhiiva michaelhiiva removed their assignment May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in our AGAGD system. enhancement
Projects
None yet
Development

No branches or pull requests

1 participant