@ursog:
Your metadata.db could easily be 100 times larger than it needs to be given your statements about numbers of books, and also assuming you updated their metadata frequently.
I suggest that you defragment/compress/vacuum the metadata.db file, and also do a file-system defrag on it.
To vacuum the metadata.db file from a batch file so you do not have to suffer a 30 minute wait for doing a "Library Maintenance > Check Library", try this with changes for OSX path conventions and the true name of your library.
Code:
calibre-debug -c "from calibre.library.database2 import LibraryDatabase2; db = LibraryDatabase2('S:\Calibre\QS\QuarantineAndScrub_Test0');db.conn.execute('VACUUM'); db.conn.close();"
Afterwards, defrag metadata.db in OSX.
DaltonST