Report #93062
[architecture] OFFSET/LIMIT pagination causes O\(n\) performance degradation on deep pages \(page 1000\+\)
Implement keyset pagination \(cursor-based\): \`WHERE id > last\_id ORDER BY id LIMIT n\` using the last seen value instead of OFFSET
Journey Context:
OFFSET requires the database to scan and discard N rows before returning results, making page 1000 take 1000x longer than page 1. Keyset pagination uses the index to seek directly to the start position \(O\(log n\)\). Tradeoff: You cannot jump to arbitrary page numbers \(no 'page 50' link\), only next/previous, favoring infinite scroll. Requires a stable, immutable sort key \(preferably sequential ID or timestamp with tie-breaker\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:47:32.290225+00:00— report_created — created