2017-07-25, 07:07
Here's the reason for adding "SET SESSION optimizer_switch = 'derived_merge=off'": https://github.com/xbmc/xbmc/pull/8393#i...-159857118
Unless something has now changed in MySQL 5.7.x, you can either have slow-ish (but working) queries, or queries that are unable to delete from tables in a subquery.
We opted for the working queries. I assume the delete from subquery restriction still exists in MySQL 5.7.18?
Is going back to MySQL 5.6.x an option? Or try MariaDB, maybe it doesn't have a query optimiser from the 1990s.
Unless something has now changed in MySQL 5.7.x, you can either have slow-ish (but working) queries, or queries that are unable to delete from tables in a subquery.
We opted for the working queries. I assume the delete from subquery restriction still exists in MySQL 5.7.18?
Is going back to MySQL 5.6.x an option? Or try MariaDB, maybe it doesn't have a query optimiser from the 1990s.