read comment and look in optimizedPlansMysql.txt

it would seem that (for queries 4 an 5) the unoptimized ones are doing
better than the optimized ones. This may be because indexes can't be
used on derived tables. look at the query plans to confirm