Adding an index on albums.album_filter can improve update performance:
Added PR #1804. For now only addressed the three UPDATE IN SELECT queries that popped up the most. Everything else seems more involved and might require changes to the DB scheme or at least other tricks, not sure how you feel about this at the current stage.
Regarding the DELETE query from my last comment, the performance issues get much better as soon as you add an index on album_filter to the albums table. For me it drops from 4.7s to 200ms without changing the query.
See GitHub Discussions:
The reason why there is/was no index is that there is a general length limit of 767 bytes for indexes in InnoDB tables that use the REDUNDANT or COMPACT row format.1
To display the current default row format:
SELECT @@innodb_default_row_format;
ToDo / Questions:
Adding an index on
albums.album_filtercan improve update performance:See GitHub Discussions:
The reason why there is/was no index is that there is a general length limit of 767 bytes for indexes in InnoDB tables that use the REDUNDANT or COMPACT row format.1
To display the current default row format:
SELECT @@innodb_default_row_format;ToDo / Questions:
album_filter_hashcolumn and index that insteadFootnotes
https://docs.oracle.com/cd/E17952_01/mysql-8.0-en/innodb-limits.html ↩