starman@programming.dev to Programming@programming.devEnglish · edit-211 months agoWhy You Shouldn’t Use OFFSET and LIMIT For Your Paginationivopereira.netexternal-linkmessage-square17fedilinkarrow-up115arrow-down117file-text
arrow-up1-2arrow-down1external-linkWhy You Shouldn’t Use OFFSET and LIMIT For Your Paginationivopereira.netstarman@programming.dev to Programming@programming.devEnglish · edit-211 months agomessage-square17fedilinkfile-text
If you are wondering why lemmy is moving away from offset pagination since 0.19, here is a nice article about it
minus-squarevzq@lemmy.blahaj.zonelinkfedilinkarrow-up1·11 months ago I have my doubts about the technique, but it could be useful in certain controlled situations This is completely uncontroversial advice and has been for 30 years. What are your doubts exactly? I’d go further: if you see a query that uses “offset” on a non-trivial production DB something is very, very wrong. Of course, the trick is that you need to make sure you have indexes for all sort orders you need to display, but that’s obvious.
This is completely uncontroversial advice and has been for 30 years. What are your doubts exactly?
I’d go further: if you see a query that uses “offset” on a non-trivial production DB something is very, very wrong.
Of course, the trick is that you need to make sure you have indexes for all sort orders you need to display, but that’s obvious.