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.
Backed up the current SQLite database.
cp photos.db photos.db.20080326
Opened the database
Then in SQLite I got some help, listed tables and ran vacuum on photos and photo_tags.
Now F-Spot is running smooth as ever.