Comment on Why You Shouldn’t Use OFFSET and LIMIT For Your Pagination

lysdexic@programming.dev ⁨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.

source
Sort:hotnewtop