I found a solution queries that contain a subquery taking forever to return a result in MySQL.
For example a query in MySQL that uses the
IN() syntax with a subquery like the following takes a few long time to return a result.
If the same query is reworked to put the subquery in the from with a join it comes back almost instantly.
It’s interesting on Microsoft MSSQL that the
IN() with a subquery is just as fast for me.
bugs.mysql.com/bug.php ( Thanks Jeremy Pointer )