Start a transaction before you do a bunch of inserts. Commit the transaction when you're done. Otherwise the DB starts/commits a transaction around each insert. The DB waits for "disk" activity to complete on the commit step, so that's the rate-determining step.
On Nov 1, 9:50 pm, Mark Carter <mjc1...@googlemail.com> wrote: > I have a database (stored on a Class 6 SD card) with a single empty > table (5 columns). There is an index on each column. > > Performing a single INSERT statement (whether using an SQLiteStatement > or calling SQLiteDatabase.insert()) takes about 800ms on my N1 > (2.2.1). The INSERT statement does NOT do anything fancy (like > subselects). > > Is there any way to speed this up? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en