What is the fastest way to populate a SQLite database from a DataTable in C # .net 2.
I am currently creating inserts for each row of the table. I tried the dataadaptor, but the speed did not seem to be faster. It currently takes 5 minutes to go through 20,000 rows and write them to the database. Any sugestions?
decision:
I found that around insertion blocks of inserts with BEGIN ... COMMIT worked for me with a remarkable speed improvement:
BEGIN; INSERT INTO friends (name1,name2) VALUES ('john','smith'); INSERT INTO friends (name1,name2) VALUES ('jane','doe'); COMMIT;
my insertion statements were about 500 bytes each, so I limited the number of statements to 100 per transaction.
source share