Creator of RediSQL / zeeSQL ( 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/…
> You do not create a long list of parameters.
I have done much worse by trying to insert a really long string of 100K params