Performance difference between 5.6 and 5.7

Hello everyone,

I have a performance issue about a query.
I created 2 serveurs (mysql 5.6 and mysql 5.7), then I restored a big database.
When I do the query, it seems both server are not using same optimizer chain.
On percona server 5.7 and pxc 5.7, I got same problem than mysql 5.7.
How can you explain that? And how can I get same optimizer chain like on 5.6 for same performance?
I join attachements about explain format=json for more details.

Thank you.

mysql_explain_56.json.txt (2.97 KB)

mysql_explain_57.json.txt (3.12 KB)

Problem solved.

There is new option with 5.7 with optimizer_switch devired_merge=on.
With derived_merge=off, performance is back.