SQLite database file size didn't shrink after dropping huge table
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.
精彩评论