4 ms·
It is solved with keyset pagination to be precise. "I don't want to lose my place in the feed" - well, you just lost it because of OFFSET.
by lukaseder 7y ago
It is solved with keyset pagination to be precise. "I don't want to lose my place in the feed" - well, you just lost it because of OFFSET.
- deleted 7y ago[deleted]
- yowlingcat 7y agoSure. I'm not advocating for OFFSET. I guess to be candid, I really didn't like the examples you picked. Arbitrary pagination is useful, and I don't understand why you spent so much time trying to attack it unconvincingly. Beyond that, in your post, you link to two approaches for keyset pagination: the seek method and the page boundary caching approach. I'd much rather use the seek method you link to and leave it at that, because it doesn't rely on the brittleness of row_number(), which is liable to change. Of course, this all depends on your use case -- as you point out, if your data is truly static, page boundary caching is unlikely to become dangerous.
- lukaseder 7y agoI'm not sure I get it. A row_number() based approach is the same thing as using OFFSET...