#25230: Change to Query.get_count() causes big performance hit
-------------------------------------+-------------------------------------
     Reporter:  dexity               |                    Owner:  (none)
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  1.8
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Sidharth Dusanapudi):

 I'd like to take a conservative swing at this before opening a PR.

 After reading #23875, #30685, and PR #16630, would a narrow fix be welcome
 if it only optimizes cases where distinct() is clearly redundant for
 count(), e.g. base-table-only queries with no joins, slicing, grouping,
 aggregation, annotations, distinct(*fields), combinators, or extra select?

 I’d leave the broader/edge cases from #16630 out of scope. I also have
 local PostgreSQL/MySQL benchmark numbers for the current wide DISTINCT
 subquery if useful.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/25230#comment:13>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019e1e94bb34-78c15472-1edb-4013-858a-f03aacf606a7-000000%40eu-central-1.amazonses.com.

Reply via email to