SQLite DBs are very fast, it takes less than half a second to insert a
record/records. 1000 records is a lot! I haven't seen your code but
what you should do is:

openDatabase once
insert all records
close DB

Avoid open/close database 1000 times. Also the GC is probably very
busy during the operation so look for optimizations(avoid unnecessary
object creation, StringBuilder instead of String when appropiate,
etc...)

 Hope this helps!

Alberto



On Sep 11, 4:41 am, ls02 <agal...@audible.com> wrote:
> I need to insert 1000 rows into SQLite DB. Each row has 12 columns,
> text and numbers, none is big. It takes literraly minutes to insert
> all 1000 items. I use SQLiteDatabase.insert to insert each row.
>
> What can I do to improve this performance?

-- 
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

Reply via email to