Bulk record insertion into SQLLITE

joneden

Active Member
Licensed User
Longtime User
Hi All,

I'm inserting a lot of records into my sqlite database. Is there any way to insert them in bulk? I'm finding that it's very slow when dealing with a lot of records.

Regards,

Jon
 

mc73

Well-Known Member
Licensed User
Longtime User
Sure you are using beginTransaction - transactionSuccessful and endTransaction at the beginning and the end of your insertions' loop?
 
Upvote 0

joneden

Active Member
Licensed User
Longtime User
Ah yes - I'm using the DBUtils and InsertMaps command but repeating the command rather than doing a list of maps.

fingers crossed that helps :)

Thanks for the pointer!

Regards,

Jon
 
Upvote 0

joneden

Active Member
Licensed User
Longtime User
In case anyone else stumbles over this with similar issues this is indeed the fix. My sync went from between 45-60 seconds to about 3 seconds.

Thanks for the pointer mc73 :)
 
Upvote 0
Top