Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEnsure batch inserts are done in a transaction on SQLite #1177
Comments
added a commit
that referenced
this issue
Sep 21, 2017
sgrif
referenced this issue
Sep 21, 2017
Merged
Ensure batch inserts on SQLite run in a transaction #1183
added a commit
that referenced
this issue
Sep 21, 2017
added a commit
that referenced
this issue
Sep 21, 2017
added a commit
that referenced
this issue
Sep 21, 2017
added a commit
that referenced
this issue
Sep 21, 2017
killercup
closed this
in
#1183
Sep 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sgrif commentedSep 19, 2017
There's a significant performance difference between doing a batch insert in a transaction vs out of a transaction on SQLite, since if we're not in a transaction it'll write to disk between every query. The implementation will need to be a little bit more complex than just
conn.transaction(|| what we have now), since savepoints have a non-zero cost so we should only start a transaction if we aren't already inside of one.