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

  • lysdexic@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    For the article-impaired,

    Using OFFSET+LIMIT for pagination forces a full table scan, which in large databases is expensive.

    The alternative proposed is a cursor+based navigation, which is ID+LIMIT and requires ID to be an orderable type with monotonically increasing value.

    • Blackmist@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 months ago

      Which it almost never is.

      Any data as simple as that is unlikely to reach a number of rows likely to cause an issue with performance.