#27388: Filter chaining results in unnecessary joins (and degenerate
performance)
-------------------------------------+-------------------------------------
Reporter: Connor Osborn | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: queryset, join, | Triage Stage:
performance | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0
Comment:
> I think the correct way forward is to make those two queries that are
logically equivalent produce the same sql.
Unfortunately this would be backward incompatible as this is
[https://docs.djangoproject.com/en/1.10/topics/db/queries/#spanning-multi-
valued-relationships a documented feature].
I recently suggested [https://groups.google.com/d/msg/django-
developers/dpL5z1yOe58/msQTmGwMCAAJ adding an API] to allow alias reusing
in a specific context. I suspect your use case is similar to the one
reported in #27343 but related to DRF instead of the admin.
--
Ticket URL: <https://code.djangoproject.com/ticket/27388#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.4e3737e59d69cca6b9a30591cdf97838%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.