On Tue, Feb 17, 2009 at 7:40 AM, M N Islam Shihan <[email protected]> wrote: > > Hi, > > Please go through the comments of the blog post you are referring and you'll > understand why, how and where to use the django ORM. > > Regards, > Shihan
Something I've just noticed here. One of the comments links to the documentation for QuerySet.iterator: http://docs.djangoproject.com/en/dev/ref/models/querysets/#iterator The documentation includes the statement, "A QuerySet typically reads all of its results and instantiates all of the corresponding objects the first time you access it; iterator() will instead read results and instantiate objects in discrete chunks, yielding them one at a time." Am I mistaken, or is this not exactly correct? As I understand it, the difference between QuerySet.__iter__ and QuerySet.iterator isn't that the former reads and instantiates everything all at once, but that the former will make use of the QuerySet's result cache, reading from it when available and filling it as a side effect of iteration. Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
