mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
newdb: Disable autocommit during executemany for a performance boost
This commit is contained in:
parent
dc16d477d1
commit
f28c60d066
@ -287,6 +287,7 @@ class Connection(apsw.Connection): # {{{
|
||||
return cursor.execute(sql, bindings)
|
||||
|
||||
def executemany(self, sql, sequence_of_bindings):
|
||||
with self: # Disable autocommit mode, for performance
|
||||
return self.cursor().executemany(sql, sequence_of_bindings)
|
||||
|
||||
# }}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user