slow sqlite insert using the jdbc drivers in java slow sqlite insert using the jdbc drivers in java sqlite sqlite

slow sqlite insert using the jdbc drivers in java


Did you have your queries autocommitted? That could explain why it took so long. Try wrapping them in a begin / end so that it doesn't have to do a full commit for every insert.

This page explains begin/end transaction, while the FAQ touches on inserts/autocommits.


If you want to further optimize, you can look into batching your insert queries together. So you can change 1 million inserts to 1000 inserts of 1000 batches.