Currently there is a table in my android sqlite database that contains around 500k of records. It takes around 11 seconds to delete on my laptop but it takes forever to delete on my smartphone.
I tried to drop the table but it just hang there. Is there any strategy to solve this? I've stuck at this problem for few hours! :(
new Thread(new Runnable() {
@Override
public void run() {
StockDocRepo repo = new StockDocRepo(this);
repo.deleteInactiveRecords();
}
}).start();
as for the deleteInactiveRecords function is just pure SQL raw query.
DELETE FROM stockloc WHERE active = "0"
Aucun commentaire:
Enregistrer un commentaire