IFDB has been getting slower and slower lately, but intermittently.
IFDB is a classic “LAMP stack” application, running on Linux, Apache, MySQL (MariaDB, actually), and PHP.
I have fairly limited experience operating a LAMP stack app, but my rough understanding is that, when it gets intermittently slow, it’s usually the database that’s to blame. (And, indeed, it’s the DB process that’s running hot on the machine.)
Back in October, I turned on slow-query logging, and filed a dozen bugs on queries that could be potentially improved.
I have not, since then, had time to work on them. PRs would be welcome for any of these, or even just advice.
A couple of recurring issues:
- We have some views, but the views themselves don’t have indexes, so it seems like it’s just doing a full table scan of the underlying data. Is that how views work? Could I create an index for these views??
- Is there a clever way in MariaDB to do full-text search indexes? IFDB search is just always doing full table scans of the games table, which seems bad.