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

[Feature Request]: Keyset pagination for list commands #191

Open
1 task done
A248 opened this issue Dec 28, 2022 · 0 comments
Open
1 task done

[Feature Request]: Keyset pagination for list commands #191

A248 opened this issue Dec 28, 2022 · 0 comments
Labels
improvement Ideas for streamlining existing features
Milestone

Comments

@A248
Copy link
Owner

A248 commented Dec 28, 2022

I have confirmed that ...

  • There is no duplicate feature request.

Description

The use of fixed pages reduces database efficiency because the RDMS must scan all punishments up to and including those on the specified page, before discarding the previous pages. For example, /banlist 10 requires the database to internally retrieve pages 1-9 only to discard them after the SQL LIMIT clause is applied.

Keyset pagination was one of the original motives behind offering seekAfter in the API. For compatibility reasons, the list commands continue to use OFFSET / LIMIT instead of keyset pagination. We should offer an option to toggle keyset pagination, which would change the applicable variables. This feature would be best paired with clickable messages. It's worth considering what to do if a user nevertheless enters a fixed page number. Perhaps keyset pagination and traditional fixed-page specification could work alongside each other for maximum utility, combining convenience and efficiency.

@A248 A248 added the feature New feature or request label Dec 28, 2022
@A248 A248 modified the milestones: 1.1.0, 1.1.1 Dec 28, 2022
@A248 A248 added improvement Ideas for streamlining existing features and removed feature New feature or request labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Ideas for streamlining existing features
Projects
None yet
Development

No branches or pull requests

1 participant