stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.59k stars 1.55k forks source link

Is there a “VACUUM” function to reduce file size? #1047

Closed Highflyer94 closed 2 years ago

Highflyer94 commented 3 years ago

I delete a lot of data when adding new one to my database to keep the file size low. But as the deleted rows remain in the memory the file size doesn’t reduce. Is there a supported vacuum function?

jberkel commented 2 years ago

Not built in, but you can just do

connection.run("VACUUM")