Stop Using OFFSET: Keyset Pagination in Postgres
OFFSET pagination gets slower the deeper you go and can skip or repeat rows. Keyset pagination fixes both, if you handle ties and composite sort keys correctly.
Nov 255 min read
2 stories
OFFSET pagination gets slower the deeper you go and can skip or repeat rows. Keyset pagination fixes both, if you handle ties and composite sort keys correctly.
Retries fix transient failures. They do nothing for the records that quietly drifted out of sync. Here is how I think about the difference.