SQLite Forum

Increasing insert performance of an in-memory db
Login
I would play around with the transaction size to see if there is a sweet spot to be found.

As for the journal mode, I *think* you should try the WAL mode, since this causes inserts to become simple appends vs changing a b-tree structure (even if you will have to pay later with a checkpoint). With a synchronous = 0 and large transactions your app will mostly be doing everything in memory. 

Also, in WAL mode and given your transaction size, you want to make sure that your page cache is big enough to hold your transactions.

Do you have any reads ongoing while you are inserting?