Based on the file modification dates, I went from using the Digikam SQLite database to using their embedded MySQL database in May 2018. I did it because at the time everyone was saying that for a large database it’s better to use SQL than SQLite. For a long time it seemed to work well enough like that. But, for the last few months, MySQL hasn’t quite been right. It’s been complaining about issues with InnoDB. Unfortunately, in my Googling I couldn’t figure out how to attempt to fix that issue with an embedded database. All the solutions seemed to involve using a “real” MySQL. So, sick of all that, I decded to go back to SQLite. Since launching Digikam (for the past two days) just causes my computer to go to a load average in the 50s and lead to an unending stream of SQL errors, I had to move the folder that contained MySQL and start from scratch. It was also an opportunity to do what they recommend and have the database reside on an SSD.
Luckily for me, I save all the photos’ tags in the photo files themselves so I wouldn’t be losing anything to do this. Well, that is, I wouldn’t lose anything but time. It took 3.5 hours to re-index all the photos. Considering that I have literally hundreds of thousands of photos, that’s probably pretty impressive. After that, the interface still wasn’t responsive – it wasn’t showing my Albums. But I didn’t panic just yet. I’d purposely launched it in a terminal (Yakuake’s my favorite to be able to check no matter what virtual desktop or activity I’m in) so I waited to see if I was doing anything. And I worked on other projects. Then, after about 5 minutes of seeming not to do anything, it started letting me know it couldn’t create thumbnails for my video files. So I guess it’s working on thumbnails. That started approximately 1315 and ended approximately 1349.
Right now, I’ve got a digikam4.db that’s 486MB, a similarity.db what’s 24k, and a thumbnails-digikam.db that’s 54MB. I’m hoping that once Digikam gets over the hump of dynamically creating some thumbnails as I load directories, things will run better than they’ve been running for the past couple months. Of course, since I have my database on an SSD now (my /home SSD) this does introduce the problem of having the database file backed up separately from the photos (/home vs /media/Photos), but I think I’ll just set up a cron job to tar up the databasefiles periodically and store a copy on /media/Photos.