#25230: Change to Query.get_count() causes big performance hit
----------------------------------------------+--------------------
     Reporter:  dexity                        |      Owner:  nobody
         Type:  Cleanup/optimization          |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.8
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 https://code.djangoproject.com/ticket/23875
 Recent pull merge
 
https://github.com/django/django/commit/c7fd9b242d2d63406f1de6cc3204e35aaa025233?diff=unified
 generates SQL which causes severe performance hit when using distinct
 parameter.
 Instead of getting something like:
 {{{SELECT DISTINCT COUNT('*') FROM some_model;}}}

 it generates SQL query which looks:
 {{{SELECT COUNT('*') FROM (SELECT DISTINCT * FROM some_model) subquery;}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25230>
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.f1bd92c0231e56e10f78f3288652d0e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to