MihaMarkic wrote
> 
> However, I doubt that transaction will speed up inserts.
> 

Not to offend, but you should read the SQLite docs. "Use transactions" is
the first reply for every newbi, who has trouble with insert performance.

SQLite uses auto transactions. This means, if you do not open a transaction,
SQLite opens and closes one for you for every statement. By default, this
includes creating a journal file, writing the changes to journal, merging
into database, deleting the journal file. Inserting a single record makes no
difference, but if you try to do a bulk import, this damn slow. But it
becomes extremely fast, when you surround all your insert statements by a
transaction. 

On a PC you speed up from about 86 records per second without transactions
to 23.000 records per second just by two additional statements
(BeginTransaction + EndTransaction) in this scenario:
http://stackoverflow.com/questions/1711631/how-do-i-improve-the-performance-of-sqlite

Thomas



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/sqlite-optimisation-tp5711189p5711207.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to