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

Implement postgres keyset pagination #1281

Open
reshmakh opened this issue Dec 11, 2022 · 0 comments
Open

Implement postgres keyset pagination #1281

reshmakh opened this issue Dec 11, 2022 · 0 comments
Labels
fhir-datastore Related to the FHIR datastore, includes API and FHIR operations

Comments

@reshmakh
Copy link
Member

We currently use "OFFSET"/"LIMIT" for pagination. It's simple and works great for our current data size.

As we get to larger data sets, it will start to incur some performance penalties.

The "right" way to implement pagination at scale is called "keyset" pagination:
https://www.citusdata.com/blog/2016/03/30/five-ways-to-paginate/
https://leopard.in.ua/2014/10/11/postgresql-paginattion

This is supported/encouraged in the FHIR graphql spec:
https://www.hl7.org/fhir/graphql.html#searching

(named "cursor", unrelated to a db cursor)

@reshmakh reshmakh added the fhir-datastore Related to the FHIR datastore, includes API and FHIR operations label Dec 11, 2022
@rahul1 rahul1 added this to the Milestone Quality milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fhir-datastore Related to the FHIR datastore, includes API and FHIR operations
Projects
None yet
Development

No branches or pull requests

2 participants