6 ms·
That's a great example. I understand the use case now. I note this use case can be solved using keyset pagination instead of offset/limit, because the ordering
by ngrilly 9y ago
That's a great example. I understand the use case now.
I note this use case can be solved using keyset pagination instead of offset/limit, because the ordering of messages is stable: messages are never inserted in the middle of the list; they are appended at the end. We can attribute a number to each message, and use this message to filter and sort.
- thriftwy 9y agoBut what if a message gets deleted from middle of the list? This happens with forum messages.
- ngrilly 9y agoYou keep it and mark it "deleted", and you show "deleted" in place of the message. This is what most forums do already, independently of the underlying pagination mechanism.
- thriftwy 9y agoSo basically I'm pretty sure now that we need a new kind of SQL INDEX, as in, pagination index. To do that aforedescribed accounting for us, and more.