#30842: Prefetch_related spends considerable time constructing querysets.
-------------------------------------+-------------------------------------
Reporter: Alex | Owner: nobody
Aktsipetrov |
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords: prefetch_related
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
As part of the [https://code.djangoproject.com/ticket/26226 bugfix] django
started constructing N+1 querysets during a typical prefetch_related call
while only 2 sql queries are executed.
This adds a noticeable slowdown. Attaching the flamegraph for queryset
fetching 100 objects.
--
Ticket URL: <https://code.djangoproject.com/ticket/30842>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/051.e5b6d61590521e3d9f1dff1a0a0efdd8%40djangoproject.com.