Why are you calling getWriteableDatabase so often? You should only
need to call it once, and then use that database for all your
insertions.
Also, "batch insert" generally means you insert multiple items at
once, so you should only need to do one call to bulkInsert(), and
hence one call to getWriteableDatabase.



On Fri, Sep 25, 2009 at 11:00 AM, Agus <[email protected]> wrote:
> I am doing a batch insert for N items and I have to call
> getWriteableDatabase method N times in my dbhelper method.
> and I find that the insertion time is slow takesĀ  ~9 secs for 50 rows with
> ~10 columns.
> How to improve the speed of a batch insertion, or maybe calling
> getWritebableDatabase is an expensive operation time-wise?
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to