Dealing with a large database in Android

前端 未结 3 1521
-上瘾入骨i
-上瘾入骨i 2020-12-16 14:59

I\'m currently developing an app that has the potential to create a very large database. I had planned on installing the app on the SD card to allow for some extra room. Rec

3条回答
  •  被撕碎了的回忆
    2020-12-16 15:29

    This is a comprehensive post on the subject (I'm not the author).

    I think, overall, it needs to be communicated that SQLite is just a SQL mechanism for accessing a file. It appears that the current market limit is 50mb for the entire APK. When installing to internal memory, you require 2x your APK size. Installing to sdcard requires just the stated APK size.

    Here is what you will be working against: 1.) Since SQLite is just a abstraction over your file, when you do selects, inserts, updates, etc, you will be incurring sdcard read write costs 2.) I've seen mention of a soft limit of 10000 records based on performance. This article is a bit old, so its likely gotten better.

    Other then that, you'll probably have to set up some tests to see what is feasible. Cursory search of google did not show any benchmarks to date.

提交回复
热议问题