Drop Table doesnot result on deleting data in the sqlite file

大憨熊 提交于 2021-02-05 08:35:10

问题


I have a Sqlite database file that i modify it by dropping a huge database table that contains thousands of records but the file size remains as it before dropping the table. it seems that it disconnect pointers to data . any ideas how to drop table and make a deep deletion of it in the underlying sqlite file .??


回答1:


To reclaim space, use the vacuum statement.

From a sqlite prompt

sqlite> VACUUM;

From a shell prompt.

$ sqlite3 filename 'VACUUM;'


来源:https://stackoverflow.com/questions/11926178/drop-table-doesnot-result-on-deleting-data-in-the-sqlite-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!