使用Blob的最大SQLite大小 [英] Maximum SQLite size using blob

查看:1101
本文介绍了使用Blob的最大SQLite大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个数据库,其中将使用blob存储文本和图像. 大约会有5-6k个条目,图像大小约为1MB. 这意味着5-6GB的存储空间.我的应用程序是否能够处理所有存储空间,否则将崩溃? 我想知道我的手机容量为16GB,大约占手机免费存储空间的50%. 如果blob不起作用,还有其他方法可以使用吗?

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?

推荐答案

SQLite本身可以处理那么多数据. (数据库最多可以具有 140 TB .)

SQLite itself will handle that much data just fine. (Databases can have up to 140 TB.)

将大型图像存储在文件中可能会更有效;请参见 SQLite中的内部与外部BLOB . 但是,移动设备的行为有所不同.您必须对其进行测量才能找出更快的速度.

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.

这篇关于使用Blob的最大SQLite大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆