logoalt Hacker News

Multicomplast Saturday at 8:16 PM1 replyview on HN

Would the SQLite vacuum function help with that?


Replies

mceachenlast Saturday at 8:20 PM

You can VACUUM INTO, ~~but standard vacuum won’t rewrite the whole db~~ (vacuum rewrites the whole db)

https://sqlite.org/lang_vacuum.html

(Edit: if multiple processes are concurrently reading and writing, and one process vacuums, verify that the right things happen: specifically, that concurrent writes from other processes during a vacuum don’t get erased by the other processes’ vacuum. You may need an external advisory lock to avoid data loss).

show 2 replies