One way of doing this might be by using symbolic links. I just did some experimenting on my computer. Seems to work fine. I might even use this for real...
I use Linux, but as I understand it symbolic links are available in Windows as well.
I mount / on a small but fast SSD and /home on very big slow mechanical disc.
I have my main Calibre Library in a folder on the slow disc:
The metadata is, as usual, stored in the file:
I have prepared a folder on the SSD, with the correct rights:
My goal is to have the metadata.db there, to make use of the much faster SSD, but to keep the books on the big slow mechanical disc.
I do it like this:
(I recommend that you make a good backup before you try this...)
cp /home/adoby/Calibre/main/metadata.db /opt/SpeedUp/adoby/Calibre/main
mv /home/adoby/Calibre/main/metadata.db /home/adoby/Calibre/main/metadata.db.bak
ln -s /opt/SpeedUp/adoby/Calibre/main/metadata.db /home/adoby/Calibre/main/metadata.db
The first line copies metadata.db to the SSD.
The second line moves the original metadata.db away, by adding .bak to the name.
The third line creates the symboic link.
So now I have metadata.db on the SSD, but as far as Calibre is concerned, it is still at the usual place. But since it really is a symbolic link, the faster metadata.db on SSD will be used.
I did some testing and everything seems to work fine. I am not sure about how much faster things are, but the GUI seems a little snappier. Could be my imagination...
I assume that this is rather unsafe. I am not sure what happens if you rename or move a library. Or if you use portable Calibre. Perhaps you will have good use for that backup...
If you have more Calibre Libraries, just repeat the process, and move each metadata.db to SSD and do a symlink back to the original place.