I have a program that writes hundreds of thousands of statements that
are logically unrelated, i.e. each is "transactional".

The problem is if I don't do a BEGIN TRANSACTION and do my inserts, it
takes absolutely forever for my program to finish (we're talking
hours).

If instead I do it in a single transaction (i.e. BEGIN TRANSACTION, 1
million inserts, END) it dramatically improves the time.

Is there a way to get this behavior without transactions? The reason
is most of the times the program is terminated by a user action and I
don't get a chance to END the transaction.

I'm considering doing "periodic transactions", i.e. buffer in my
application X statements and club them together.

Is there a better more SQLite idiomatic solution?
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to