开发者

SQLite database file size didn't shrink after dropping huge table

开发者 https://www.devze.com 2023-03-22 13:47 出处:网络
I c开发者_如何转开发reated a table in my database file which turned out to be way too huge (increased my database file\'s size from 2 GB to around 50GB). I just dropped it but the file size didn\'t go

I c开发者_如何转开发reated a table in my database file which turned out to be way too huge (increased my database file's size from 2 GB to around 50GB). I just dropped it but the file size didn't go down. Any way to get the db file back to normal? I'm using sqlite3 from Python.


Try vacuum.


You can activate auto_vacuum so you don't need to bother with running vacuum moving forward.

0

精彩评论

暂无评论...
验证码 换一张
取 消