Skip to content

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

@koonpeng

Description

@koonpeng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions