hardStudy question · answer published in REST API interview questions, so no pointspaginationsqlapi-design
Items missing between pages
An activity feed uses this cursor query. After a bulk import gave 300 rows the same created_at, users report items missing between pages. What is the fix?
SELECT * FROM events WHERE created_at < $1 -- created_at of last row on previous page ORDER BY created_at DESC LIMIT 50;
Discussion 0
Join free to post in the discussion.
Related questions
- Status code after creating a resourceFull Stack Developer
- Which method is idempotentFull Stack Developer
- Preventing SQL injectionFull Stack Developer
- PATCH vs PUT for one fieldFull Stack Developer
- Listing users with zero ordersFull Stack Developer
- Comparing a column to NULLFull Stack Developer
- Posts vanish from GET linksFull Stack Developer
- URL for a user’s ordersFull Stack Developer