#22757: prefetch_related isn't as effecient as it could be with
GenericForeignKey
and proxy models
-------------------------------------+-------------------------------------
Reporter: gwahl@… | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: prefetch_related | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* owner: Paulo => (none)
* status: assigned => new
Comment:
This is achievable by grouping queries by concrete model in
`GenericForeignKey.get_prefetch_queryset` but will also likely require
adjusting the prefetching logic to allow for some custom logic to be run
on assignment so returned `Child` instances can be turned into
`ProxiedChild`.
--
Ticket URL: <https://code.djangoproject.com/ticket/22757#comment:3>
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/01070182c8d82beb-5be781d7-2c30-4f29-9ecf-4b351f42b3da-000000%40eu-central-1.amazonses.com.