4 ms·
Creator of RediSQL / zeeSQL (https://zeesql.com/ https://zeesql.com/) Insertion performance on a single table are very very hard to optimize. A single process
by siscia 5y ago
Creator of RediSQL / zeeSQL (https://zeesql.com/ https://zeesql.com/)
Insertion performance on a single table are very very hard to optimize.
A single process looping it is your best bet.
I would just increase the batch size, which is the most influent factor.
Then another point... When you do batches, you do
BEGIN TRANSACTION;
for i in range(1, 50):
execute_stmt
COMMIT;
You do not create a long list of parameters.
https://github.com/avinassh/fast-sqlite3-inserts/blob/master/src/bin/basic_batched.rs#L38 https://github.com/avinassh/fast-sqlite3-inserts/blob/master...
;)