﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36497	Add ModelAdmin.estimated_count for faster changelist pagination	rylaix	rylaix	"This ticket proposes adding support for an `estimated_count = True` flag on ModelAdmin to improve pagination performance on large datasets.

When enabled, the Django admin will use an estimated row count instead of executing a full COUNT(*) in changelist views. This estimation is based on:

- PostgreSQL: pg_class.reltuples
- MySQL: SHOW TABLE STATUS

The patch includes:

- `estimate_row_count()` helper function
- Support in `ChangeList.get_results()`
- Unit tests for fallback and estimation behavior
- Integration test for PostgreSQL
- Benchmark script
- Documentation of the new ModelAdmin.estimated_count attribute

If estimation fails or is unsupported, it gracefully falls back to the standard `queryset.count()`.

A full patch is already available and a PR will be submitted shortly.
"	New feature	closed	contrib.admin	5.2	Normal	duplicate	performance pagination		Unreviewed	1	0	0	0	0	0
