#18702: Remove chunked reads from iter(qs)
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  1.4
    Component:  Database layer       |               Resolution:
  (models, ORM)                      |             Triage Stage:  Accepted
     Severity:  Normal               |      Needs documentation:  0
     Keywords:                       |  Patch needs improvement:  0
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by lukeplant):

 I think there are some cases you might have missed:

 For example, if someone gets a large result set in a qs, and does `if qs`.
 This will currently create just one instance. There could be cases where
 this is a reasonable thing to do e.g. if in some cases, but not all, you
 will go on to iterate over the whole queryset, this pattern will mean you
 only do one DB query.

 I am also hoping that at some point we will get better support for doing
 chunked reads at the DB level in Postgres. However, I guess that when you
 need that, you also need `QuerySet.iterator()`, so this change wouldn't
 affect that case much.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18702#comment:5>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to