问题
I want to create a database where text and images will be stored using blob. There will be about 5-6k entries and the size of the image will be around 1MB. That means 5-6GB of storage. Will my app be able to handle all that storage or it will crash? I wonder cause my phone is 16GB and it will be around 50% of phone's free storage. In case blob doesn't work is there an other method I can use?
回答1:
SQLite itself will handle that much data just fine. (Databases can have up to 140 TB.)
It might be more efficient to store large images in files instead; see Internal Versus External BLOBs in SQLite. However, mobile devices behave differently; you'd have to measure it to find out which is faster.
Regardless of how you store the data, as long as you still have free space, you still can store data.
来源:https://stackoverflow.com/questions/26968537/maximum-sqlite-size-using-blob