jeudi 9 avril 2015

Android delete all rows or update and remove old?

I need to store a list of contacts from my web server in my android app. The android data is just a copy of the web server and the contacts would have no foreign keys to and from the table. I'm thinking of updating the android data on a periodic basis. But I'm wondering which method would be best to update the data, I'm thinking of:



  1. Delete all rows from the table and insert all the data from the web server

  2. Update the rows that match the webserver and delete those that weren't updated.


Which method is better in terms of performance?


Aucun commentaire:

Enregistrer un commentaire