#33493: It's counter-intuitive how QuerySet.iterate() works with
prefetch_related
-------------------------------------+-------------------------------------
Reporter: abetkin | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* type: Bug => Cleanup/optimization
* resolution: => wontfix
Comment:
Support for prefetching related objects with `QuerySet.iterator()` was
added in edbf930287cb72e9afab1f7208c24b1146b0c4ec, and yes an extra query
is necessary for each chunk, it's documented. You can check related
discussions in the ticket #29984, on the [https://groups.google.com/g
/django-developers/c/ADgUd6jRvdw/m/_ZnETNlcAAAJ mailing list], and in
[https://github.com/django/django/pull/15334 PR]. I don't see any reason
to remove this feature.
--
Ticket URL: <https://code.djangoproject.com/ticket/33493#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/065.2c365e6dec3ae9a820c05be1b61c1ee1%40djangoproject.com.