We switched to cursor-based pagination
moderntreasury.com
We switched to cursor-based pagination
1–10 of 118 posts
Re: We switched to cursor-based pagination
#2Re: We switched to cursor-based pagination
#3TL;DR: The headline. TFA doesn't really add any information.
Re: We switched to cursor-based pagination
#4Everything else has big tradeoffs. You can make sure your rows are sortable by a specific column, but that means your searches must all be sorted by that column.
You can save the results of a search and page through it, but that's a lot of I/O.
You can not do any of the above, but then you run the risk of non-deterministic pagination (I went back and because someone added/deleted a row, that page is slightly different now). You also can't really link to it.
These things might all be fine. In my experience though, you run into people who really want to do search in way A, and will use the tradeoffs for way B/C/D to argue against it, as though A has no tradeoffs.
Re: We switched to cursor-based pagination
#5His site is a great resource for anyone wanting to take a deeper dive on SQL performance:
https://use-the-index-luke.com/sql/partial-results/fetch-nex...
Re: We switched to cursor-based pagination
#6Re: We switched to cursor-based pagination
#7TL;DR: The headline. TFA doesn't really add any information.
Well, except that TFA explains what DB cursors are and why they are faster than page offsets (because they skip DB entries).
Re: We switched to cursor-based pagination
#8Reminds me of Markus Winand who hands out stickers on database conferences banning offset. His site is a great resource for anyone wanting to take a deeper dive on SQL performance: https://use-the-index-luke.com/sql/partial-results/fetch-nex...
Re: We switched to cursor-based pagination
#9Reminds me of Markus Winand who hands out stickers on database conferences banning offset. His site is a great resource for anyone wanting to take a deeper dive on SQL performance: https://use-the-index-luke.com/sql/partial-results/fetch-nex...
https://old.reddit.com/?count=25&after=t3_wtpvdp
I noticed Reddit's pagination has that "after" parameter, which points to the last post on the current page.
It glitches out if the last item is deleted by moderators, but otherwise it works smoothly.