django-pagination-performance
Installation
SKILL.md
Django Pagination Performance
Use this skill when a Django list view or API slows down as pages get deeper or result sets grow. Pagination is a query-design problem as much as a response-shaping problem.
Workflow
-
Confirm the list contract.
- Is arbitrary page access required, or only next/previous?
- Does the UI need a total count?
- Can ordering be fixed and stable?
- What page size limit is acceptable?
-
Measure the current query.
- Capture SQL for the page query and count query.
- Check ordering, indexes, and high page numbers.
- Use
QuerySet.explain()for deep pages.