diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-07-24 09:07:39 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-07-24 09:07:39 +0200 |
commit | a4bbbb6e664e605634cb3f9e0564c7e4a93697be (patch) | |
tree | 864a8e2d3d62c27387b9a8414e41b54f7200af7f /dedup | |
parent | c1ce54094ba86c83144c71213ade32846e2db876 (diff) | |
download | debian-dedup-a4bbbb6e664e605634cb3f9e0564c7e4a93697be.tar.gz |
sqlalchemy's fetchmany defaults to being fetchall
This voids the benefits of processing rows during row generation as has
been observed on postgres.
Diffstat (limited to 'dedup')
-rw-r--r-- | dedup/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dedup/utils.py b/dedup/utils.py index e4d1c10..6864ad3 100644 --- a/dedup/utils.py +++ b/dedup/utils.py @@ -1,11 +1,11 @@ import sqlalchemy.event def fetchiter(cursor): - rows = cursor.fetchmany() + rows = cursor.fetchmany(1024) while rows: for row in rows: yield row - rows = cursor.fetchmany() + rows = cursor.fetchmany(1024) def enable_sqlite_foreign_keys(engine): @sqlalchemy.event.listens_for(engine, "connect") |