问题描述
去年我在他们的网站上查看 SQLite 时,推荐的 SQLite 数据库大小为 2 GB.但是现在,我再也找不到那个推荐了.
Last year when I checked about SQLite on their web site, the recommended SQLite database size was 2 gigabytes. But now, I could not find that recommendation again.
那么有没有人尝试使用最新版本的 SQLite 数据库来处理大于 2 GB 的 SQLite 数据库?SQLite 的表现如何?
So has anyone tried to work with an SQLite database that is bigger than 2 gigabytes using latest version of it? How well did SQLite perform?
P.S:我想做一个需要在本地运行的大型数据库(例如存储维基百科文章)的移动应用程序.
P.S: I would like to make a mobile application that requires big database (for example storing Wikipedia articles) that works locally.
推荐答案
没有 2 GB 的限制.
There is no 2 GB limit.
SQLite 数据库文件的最大大小约为 140 TB.
SQLite database files have a maximum size of about 140 TB.
在手机上,存储空间的大小(几 GB)会限制您的数据库文件大小,而内存大小将限制您可以从查询中检索的数据量.此外,Android 游标的结果限制为 1 MB.
On a phone, the size of the storage (a few GB) will limit your database file size, while the memory size will limit how much data you can retrieve from a query. Furthermore, Android cursors have a limit of 1 MB for the results.
数据库大小本身不会影响您的性能.只要查询访问的数据不超过数据库的页面缓存(默认为 2 MB).
The database size will, by itself, not affect your performance. Your queries will be fast as long as they do not access more data than fits into the DB's page cache (2 MB by default).
这篇关于如果数据库大小大于 2 GB,SQLite 性能会下降吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)