Python3 + sqlite3: Where's the bug?
Chris Angelico
rosuav at gmail.com
Thu Dec 20 10:05:31 EST 2012
More information about the Python-list mailing list
Thu Dec 20 10:05:31 EST 2012
- Previous message (by thread): Python3 + sqlite3: Where's the bug?
- Next message (by thread): Python3 + sqlite3: Where's the bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Dec 21, 2012 at 1:52 AM, Johannes Bauer <dfnsonfsduifb at gmx.de> wrote: > def fetchmanychks(cursor): > cursor.execute("SELECT id FROM foo;") > while True: > result = cursor.fetchmany() > if len(result) == 0: > break > for x in result: > yield x I'm not familiar with sqlite, but from working with other databases, I'm wondering if possibly your commits are breaking the fetchmany. Would it spoil your performance improvements to do all the fetchmany calls before yielding anything? Alternatively, can you separate the two by opening a separate database connection for the foo-reading (so it isn't affected by the commit)? ChrisA
- Previous message (by thread): Python3 + sqlite3: Where's the bug?
- Next message (by thread): Python3 + sqlite3: Where's the bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list