#30079: Prefetch cache should be aware of database source and .using() should
not
always trigger a new query
-------------------------------------+-------------------------------------
Reporter: Mike Lissner | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: prefetch, | Triage Stage:
multidatabase | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* version: 2.1 => master
* type: Bug => Cleanup/optimization
Comment:
Hi Mike. Thanks for the report.
On the basis of the difference between `ln64` and `ln65` I'm inclined to
accept this. `pizza0` came from `replica` and the `ln64` call just goes
with that. (That seems right/expected to me...) I see your point that
adding the `using()` shouldn't change that.
At first glance the ''"if you didn't add a `filter()`/`exclude()`"'' idea
seems OK too.
Two questions though:
1. What's the use-case for re-adding the `using()` call in `ln65`? I can't
quite see why you'd do that...?
2. Have you looked at all at what a patch might look like? (If it's simple
enough, that helps...)
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/30079#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.57b0ebb79613b99b5c58dc568ea61530%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.