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

[api-server]: support keyset based pagination #911

Open
1 task done
koonpeng opened this issue Mar 11, 2024 · 0 comments
Open
1 task done

[api-server]: support keyset based pagination #911

koonpeng opened this issue Mar 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@koonpeng
Copy link
Collaborator

Before proceeding, is there an existing issue or discussion for this?

Description

We are currently using offset based pagination, which has some drawbacks

  1. It gets slower as the offset increases.
  2. Result will be inconsistent if rows are added or removed. This mainly affects use cases like exporting data to csv.

Implementation Considerations

Keyset based pagination solves the above problems but has some other drawbacks as well

  1. Pages must be retrieved in order, it is not possible to jump to the middle of the result set.
  2. Typically it is not possible to show the number of results.

These 2 drawbacks means that we need to redesign the frontend, either some kind of infinite scrolling or infinite paging.

We can also do a mixture where the the offset pagination has a hard limit on how deep it can go, more than that will require using keyset pagination.

Alternatives

No response

Additional information

No response

@koonpeng koonpeng added the enhancement New feature or request label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant