Quote ownedbycats
If you haven't recently run a Library -> Library Maintenance -> Check Library to vacuum the database, I recommend doing so.
Something else I also found helped once when my Calibre was being lagtastic:
Library -> Library Maintenance -> Restore Database. Do a backup first!
This'll essentially wipe your metadata.db and rebuild everything from the OPF files. I'm not sure why it helped - could be there was some problem in the database file that Check Library didn't catch.
I have to wait forever for the .opf files to update. I would try it, but I am afraid of ending up with a bunch of books with wonky metadata. However, I suppose I could create a .csv with all the current info and just import it in after.