SQLite Vacuum on F-Spot

I heard on FLOSS Weekly 26: SQLite the other day about the vacuum command in SQLite and how it rebuilds the database and makes Apple Mail faster.

I started F-Spot to check some old photos and it was getting stuck. Hmm wait F-Spot uses a SQLite database too, so I tried something like this.

Went to the F-Spot directory.

cd /home/dilantha/.gnome2/f-spot

Backed up the current SQLite database.

cp photos.db photos.db.20080326

Opened the database

sqlite3 photos.db

Then in SQLite I got some help, listed tables and ran vacuum on photos and photo_tags.


.help
.tables
vacuum photos;
vacuum photo_tags;
.quit

Now F-Spot is running smooth as ever.