Replies: 1 comment
-
FYI, I have never had a need for a nested transaction so I have only played briefly with savepoints. Answers:
I coincidentally posted a drive-by response about this last week. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to optimize performance for batch insert operations, for example when a database is restored from JSON dump (say 1000 INSERT statements are run).
I'm using OPFSCoopSyncVFS + sync build in a worker.
I have the following questions:
BEGIN
SAVEPOINT
... 1k INSERT
RELEASE
COMMIT
Is there anything else I'm missing for optimizing batch inserts?
Python has a special command executemany(), but I haven't seen an analogue of this in either node's better-sqlite3 nor in wa-sqlite.
I guess, outside of a special C-level batch insert function, our best bet is wrapping it in a transaction or savepoint?
Beta Was this translation helpful? Give feedback.
All reactions