4 ms·
Worth it just for the thoughts on keyset pagination alone: https://simonwillison.net/2018/Oct/4/datasette-ideas/#Keyset_pagination https://simonwillison.net/20
by zackmorris 8y ago
Worth it just for the thoughts on keyset pagination alone:
https://simonwillison.net/2018/Oct/4/datasette-ideas/#Keyset_pagination https://simonwillison.net/2018/Oct/4/datasette-ideas/#Keyset...
https://use-the-index-luke.com/sql/partial-results/fetch-next-page https://use-the-index-luke.com/sql/partial-results/fetch-nex...
I've implemented this myself (poorly) for mutable data as I slowly began to lose my mind. For example a feed of users' posts (ordered uniquely for each user based on their personal preference) that can be individually created and deleted, and you don't have enough memory to cache all of the query results to be returned to each user immutably. As far as I can tell, this is an open problem.
- zeeg 8y agoNot sure if I still agree with what I wrote here, but related article from many years back: http://cra.mr/2011/03/08/building-cursors-for-the-disqus-api http://cra.mr/2011/03/08/building-cursors-for-the-disqus-api There's also an implementation in Sentry, that is probably too complex, awful code, and hard to read, but is open source if anyones curious: https://github.com/getsentry/sentry/blob/master/src/sentry/utils/cursors.py https://github.com/getsentry/sentry/blob/master/src/sentry/u...