英语的借口
我使用SQLite并测试它.插入数百万行以测试速度.并在任何插入后删除行.
但我知道我的数据库大小是33.0 MB …..现在数据库是空的.但磁盘上的大小为33 MB. 为什么?
你能帮助我吗?
解决方法
The VACUUM command rebuilds the entire database. There are several reasons an application might do this:
Unless SQLite is running in “auto_vacuum=FULL” mode,when a large amount of data is deleted from the database file it leaves behind empty space,or “free” database pages. This means the database file might be larger than strictly necessary. Running VACUUM to rebuild the database reclaims this space and reduces the size of the database file.
https://www.sqlite.org/lang_vacuum.html
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|