1

So I am deciding to use the sqlite database to cache server data. I am not sure how many rows is considered acceptable. Is 1,000 rows too many? Ideally I want to keep on the local phone as many rows as I can get away with. But I don’t want my app to slow down the phone of the user or have any adverse effect. So given the following schema, how many rows should I keep locally?

table has 12 columns as: 1 blob, 2 real, 4 integer, 5 text. The blob is for thumbnail the size of a Youtube thumbnail.

I am already aware of What is a maximum size of SQLite database on Android?. But that thread is for someone who wants to reach the limits. What I want to know is as a good android citizen, what is a safe number of rows to have? Or in terms of memory, how large should my db be so that my app plays well with others so to speak?

For more context, my plan is to get the data from server to the db and to get data from the db through a CursorLoader that then talks to a RecyclerView.Adapter.

Community
  • 1
  • 1
Katedral Pillon
  • 14,534
  • 25
  • 99
  • 199
  • 2
    If you are syncing data, your primary gating factor should be bandwidth, not disk space, IMHO. Many users might not bat an eye at your app taking up 100MB of storage, if they feel they are getting value from it. Some of those same users might get a bit irritated if you consume 100MB of bandwidth to download that 100MB of storage, as they pay by the MB/GB. – CommonsWare Sep 04 '15 at 20:53
  • Thanks @CommonsWare but I am hoping that the caching will help with not having to download data all the time and that download will happen incrementally. – Katedral Pillon Sep 04 '15 at 22:12

0 Answers0