The symptom Agents see duplicate and missing tickets across pages because new rows arrive while OFFSET-based paging is underway. The query order is not stable enough for the UI contract. Framework Stable order → Access path → Page strategy You fix pagination by deciding the ordering contract first and the page mechanism second. Use a deterministic ORDER BY with a tie-breaker. If the product only needs next rows after this one, prefer keyset pagination. If it truly needs numbered pages, keep the sort stable and support it with the right index or windowed numbering. Common trap OFFSET over a non-deterministic…
Read the full lesson
Sign up free: one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in