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

  1. 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?
  2. 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.
Installs
46
Repository
lvtd-llc/skills
GitHub Stars
1
First Seen
Jun 21, 2026
django-pagination-performance — lvtd-llc/skills