Changes between Initial Version and Version 4 of Ticket #29984


Ignore:
Timestamp:
Nov 18, 2019, 5:05:14 AM (5 years ago)
Author:
Asif Saifuddin Auvi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29984

    • Property Triage Stage UnreviewedAccepted
    • Property Summary Support prefetch_related with Queryset.iteratorSupport prefetch_related() with Queryset.iterator()
    • Property Has patch set
    • Property Needs documentation set
    • Property Version 2.1master
  • Ticket #29984 – Description

    initial v4  
    1 I was surprise when I found out that `prefetch_related` calls are ignored when using `Queryset.iterator`. I noticed in the docs here https://docs.djangoproject.com/en/2.1/ref/models/querysets/#iterator that it is because the "these two optimizations do not make sense together." That may have been true in the past, but it is definitely not the case now. The iterator allows chunking (by default 2000) and it would be very helpful to prefetch related for each chunk.
     1I was surprised when I found out that `prefetch_related` calls are ignored when using `Queryset.iterator`. I noticed in the docs here https://docs.djangoproject.com/en/dev/ref/models/querysets/#iterator that it is because the "these two optimizations do not make sense together." That may have been true in the past, but it is definitely not the case now. The iterator allows chunking (by default 2000) and it would be very helpful to prefetch related for each chunk.
Back to Top