#33493: It's counter-intuitive how QuerySet.iterate() works with 
prefetch_related
-----------------------------------------+------------------------
               Reporter:  abetkin        |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  dev
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 Hi django fellows!

 I've stumbled upon this code in the main branch: (see screenshot)

 The usecase is iterating through a queryset with prefetch_related lookups
 specified.

 Do I understand correctly that multiple database queries happen upon
 fetching every chunk, and also that multiple database connections are
 required?

 If so, than I think it would be better just to prohibit the use of
 prefetch_related with QuerySet.iterate

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33493>
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/050.6a7de7f518febd22420fbcd20ee62971%40djangoproject.com.

Reply via email to