I have found the result. When adding beginTransaction. insert() delete () and update() will be added to this transaction also, which means putting many sql statements into one transaction will save time.
On Sep 16, 12:42 pm, Alex Tang <[email protected]> wrote: > For SQLiteDatabase.beginTransaction(), it starts a new transaction. > And SQliteDatabas.insert() delete() update(), does these api starts a > new transaction too? > > That's to say. If I use > db.beginTransaction(); > try{ > db.insert(..): > db.delete(); > db.update(); > db.setTransactionsSuccessful();}finally{ > > db.endTransaction();} > > In this way, will file reading times will decrease? Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

