If you are wondering why lemmy is moving away from offset pagination since 0.19, here is a nice article about it

    • Max-P@lemmy.max-p.me
      link
      fedilink
      arrow-up
      5
      ·
      11 months ago

      Lemmy just implemented it for 0.19 and it makes a big difference on heavier queries like Scaled homepage.

      It also has the advantage of your pagination not getting screwy if new content has been added between page 2 and 3 queries.

      • vzq@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        1
        ·
        11 months ago

        It depends on what you want to do and how you want it to behave if data is inserted or deleted. “Ten items after the last one I’ve seen” is another thing than “items 30 to 39”.

    • vzq@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      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.