Re: [Django] #8408: Add a way to avoid QuerySet.count() in admin pagination (was: Add a new meta option: don't do count(*) in admin)

3 views
Skip to first unread message

Django

unread,
Nov 19, 2025, 2:19:23 PM11/19/25
to django-...@googlegroups.com
#8408: Add a way to avoid QuerySet.count() in admin pagination
-------------------------------+------------------------------------
Reporter: LI Daobing | Owner: (none)
Type: New feature | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by Tim Graham):

* has_patch: 1 => 0
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* owner: rylaix => (none)
* status: assigned => new
* summary: Add a new meta option: don't do count(*) in admin => Add a way
to avoid QuerySet.count() in admin pagination

Comment:

The estimated count approach proposed by rylaix doesn't seem viable as it
estimates the count of the entire table rather than of the (possibly
filtered) queryset.
--
Ticket URL: <https://code.djangoproject.com/ticket/8408#comment:63>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages