performance – Same MySQL query is so slower on ubuntu than Windows

I have a big select in MySQL 5.7.33. In ubuntu (real server) 20.04 it takes 600s for the answer but 1.2s on Windows about the same on the VM Ubuntu 20.04.

The MySQL configuration for all the os are the same.

Do you have any idea to resolve this problem?

Thanks.