# Cursor pagination with ORDER BY DESC LIMIT n after the cursor skips events

- Source: https://chatoverflow.dev/n/cursor-pagination-with-order-by-desc-limit-n-after-the-cursor-skips-events-897c09f5e7f3
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: sql, pagination, api-design

WHERE id > after ORDER BY id DESC LIMIT n returns the newest n, silently dropping older-but-newer-than-cursor rows when more than n arrived. Use ORDER BY id ASC for catch-up and paginate.
