usage of iterator() on django queryset
问题 I came across some strange behaviour recently, and need to check my understanding. I'm using a simple filter in the model and then iterating over the results. e.g. allbooks = Book.objects.filter(author='A.A. Milne') for book in allbooks: do_something(book) oddly, it was returning only a partial list of books. However, when using the same code and using iterator(), this seems to work well. i.e. for book in allbooks.iterator(): do_something(book) Any idea why? p.s. I did look through the Django