3 ms·
Cursor based pagination is much better from a performance point of view against large amounts of data. It's also sometimes called keyset pagination - there's a
by simonw 6y ago
Cursor based pagination is much better from a performance point of view against large amounts of data.
It's also sometimes called keyset pagination - there's a good article about that here: https://use-the-index-luke.com/no-offset https://use-the-index-luke.com/no-offset
I implemented it in https://datasette.io https://datasette.io - it's quite tricky to build if you want to support arbitrary sort orders.
- andrewingram 6y agoI built a utility for Graphene + Django to do it properly with arbitrary sorts, though one does need to be careful about exposing sorts orders which aren’t backed by any indexes.