Interview practice question
Offset pagination is slow on deep pages
Backend Engineering · Relational Databases · Beginner
Your admin page uses LIMIT 50 OFFSET 500000 and it is very slow. Why, and what can you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- DB scans and discards offset rows.
- Cost grows with offset.
- Keyset/seek pagination (WHERE id > last).
- Index on sort column.
- Limit max page depth.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.