#28107: Can't perform annotation on related table when un-managed model is
backed
by a DB view
-------------------------------------+-------------------------------------
Reporter: powderflask | Owner: Vojtěch
| Boček
Type: Bug | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: QuerySet.extra | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Vojtěch Boček):
* owner: nobody => Vojtěch Boček
* status: new => assigned
Comment:
Hello, this change pretty much prevents me from upgrading to 2.x since my
app displays data from a DB it doesn't own (so it is unmanaged) and the
GROUP BY optimizations are required to get decent performance.
I have implemented changes proposed by Simon in this pull request:
https://github.com/django/django/pull/11606. It attempts to auto-detect
whether the unmanaged table is a view and enables the optimization when it
is a regular table.
--
Ticket URL: <https://code.djangoproject.com/ticket/28107#comment:23>
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/069.c55dabd1bc4cd4a605a86e301c43337d%40djangoproject.com.