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
    ·
    11 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.