title: When to use or not use iterator() in the django ORM
body: <p>This is from the <a href="https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.iterator" rel="noreferrer">django docs on the queryset <code>iterator()</code> method</a>:</p>
  
  <blockquote>
    <p>A QuerySet typically caches its results internally so that repeated evaluations 
        do not result in additional queries. In contrast, iterator() will read results 
        directly, without doing any caching at the QuerySet level (internally, the default iterator calls iterator() and caches the return value). For a QuerySet which
        returns a large number of objects that you only need to access once, 
        this can results in better performance and a significant reduction in memory.</p>
  </blockquote>
  
  <p>After reading, I'm still confused: The line about increased performance and memory reduction suggests we should just use the <code>iterator()</code> method. Can someone give some examples of good and bad cases <code>iterator()</code> usage?</p>
  
  <p>Even if the query results are not cached, if they really wanted to access the models more than once, can't someone just do the following?</p>
  
  <pre><code>saved_queries = list(Model.objects.all().iterator())
  </code></pre>