Report #101988
[architecture] Pagination that stays fast as the table grows
Use keyset \(cursor\) pagination on an immutable, indexed column such as \`created\_at\`/\`id\` instead of \`OFFSET\`. Request the next page with \`WHERE \(created\_at, id\) > \(last\_seen\_created\_at, last\_seen\_id\) LIMIT n\`.
Journey Context:
\`OFFSET\` forces the database to scan and discard all preceding rows, so cost grows linearly with page depth and can return duplicates when rows are inserted between pages. Keyset pagination is O\(log n\) per page and stable under concurrent inserts, but it cannot jump to an arbitrary page number and requires a deterministic tie-breaker column. Only use \`OFFSET\` for small, static result sets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T04:46:50.503353+00:00— report_created — created