#8408: Add a new meta option: don't do count(*) in admin -------------------------------+------------------------------------------- Reporter: LI Daobing | Owner: Thomas Chaumeny Type: New feature | Status: new Component: contrib.admin | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 1 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------------------------------
Comment (by Brett Higgins): In addition to slow COUNT queries, I've just noticed that the listing page calls `len()` on a potentially slow queryset: https://github.com/django/django/blob/9a3454f6046b9b7591fd03e21cf6da0b23c57689/django/contrib/admin/options.py#L1816 On my listing page, I have a couple nested lookups, so this becomes a complex query with four joins, and it can take tens of seconds to run for around 600k records. With too many more records than that, I'm running afoul of AWS Lambda timeouts (30s, just like the Heroku user mentioned above). All this to say - any solution to this slow COUNT issue should also address (avoid) this slow query as well. -- Ticket URL: <https://code.djangoproject.com/ticket/8408#comment:56> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.571c9963fa94be1855b4701545693ab2%40djangoproject.com.