Android Question CloudKVS & physical data deletion

luke2012

Well-Known Member
Licensed User
Hi All,
I'm implemented a customer project using CloudKVS from @Erel. I keep all the original CloudKVS API and implemented custom business logic on top of the standard APIs.

The problem is that for my specific case (on top implementation), the Clients KVS has a performance problems when there are many records within the database.

I found a solution: using SQLite Expert I (physically) delete all the orders items and it works fine (customer doesn't need to keep them).

But this solution is not optimal because I have to do it manually each 1 or 2 months and connect to the CloudKVS Server of the customer to replace the main db.

Is there an alternative solution that I don't known ?

Thanks in advance :)
Luca.
 

luke2012

Well-Known Member
Licensed User
To make it works fine I do this (periodically):

1) On server db: I run a sql delete on all "orders" records
2) I ask to the customer to remove and re-install the apps (CloudKVS Clients)

And all work fine. But this is not a very elegant solution to do periodically and manually.
 

luke2012

Well-Known Member
Licensed User
Untested suggestion:
Delete old records from the client when the app starts:
B4X:
sql.ExecNonQuery2("DELETE FROM data WHERE time < ?", Array(DateTime.Now - 7 * DateTime.TicksPerDay))
You can do a similar thing when the server starts or better every day using a timer in DB module.
Thanks Erel. I'll try it.
 
Top