In the world of databases, a transaction is a unit of work (including insertions, deletions, updates) that is Atomic, Consistent, Isolated, and Durable. By default in SQLite, each insertion is a transaction. And to preserve data integrity, SQLite will wait until data is stored on the disk before completing the transaction. So if you have a large data set that you’re trying to insert into your database, inserting each piece individually is going to seem extremely slow.
You want to use transactions, not just because they will increase the performance of your database operations. Because transactions are atomic, they will help you ensure your database is consistent. For example, if you need to process a large batch of instructions, then either everything happened correctly, or if something went wrong then that whole transaction failed (so it’s all or nothing).
So, for each ContentURI you are suppporting (each table in your db), write its respective bulkInsert case as above. And now you will witness an absolutely HUGE increase in performance (for me it cut the bulkInsert() time from 20 seconds to 1), and the return value of the bulkInsert() will now let you know if the transaction was successful or not. Also look here to see the transaction API.