I am using MySql 5.7 and having a query with a join on a derived table. Checking the execution plan, MySql is creating materialized but surprised it is using block nested loop t