Report #103453
[architecture] Pagination becomes slow on large tables
Use keyset \(cursor\) pagination over offset pagination; encode the last seen value of an indexed, unique sort column into the cursor and query \`WHERE sort\_key > last\_seen LIMIT n\`.
Journey Context:
\`OFFSET\` scans and discards N rows, so latency grows linearly with page number and can cripple deep pages. Keyset pagination turns page N into an O\(log N\) index lookup. Cursors must be based on stable, indexed, preferably unique columns \(or a composite tie-breaker\), and they cannot jump to arbitrary page numbers. Keep offset only for small datasets or when users genuinely need random access to page numbers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:25:22.182222+00:00— report_created — created