Iterating over big dataset
Normally peewee will cache result rows so that if you iterate, slice or index the result set multiple times you will not incur multiple queries. When you use `iterator()`, rows will not be cached.

It's still possible to run out of memory, depending on your database, because the rows are not streamed to the cursor but loaded all at once. What database are you using?
 I use mysql.
But why are rows loaded at once?
 > But why are rows loaded at once?

You'll have to look into the implementation of the python driver. My understanding is that the database loads the rows into memory and passes them to the cursor, rather than streaming them to the cursor.

Peewee's `iterator()` behavior is covered by unit tests and I believe it to be working, so I am going to close this.
 > You'll have to look into the implementation of the python driver 

By looking up the pymysql driver, is it possible to use the `fetchall_unbuffered()` when iterating large results?


https://pymysql.readthedocs.io/en/latest/modules/cursors.html#pymysql.cursors.SSCursor.fetchall_unbuffered
I try to iterate result set:

```
for field1, field2 in query.tuples().iterator():
    print .... 
```

But it failes with 'out of memory' (script just gets killed by kernel), so, I see no difference in my case - either with iterator or without.

I have there python 2.6 and peewee 2.3.2.

I'm not familiar much with lazy loading in python, except generators, but how this supposed to work: https://github.com/coleifer/peewee/blob/master/peewee.py#L2439  ? In `execute` `self._qr` gets constructed anyway - so how can this save memory to allow coping with big dataset? Is it me missing something, or maybe obsolete python version or ...?
