Same MySQL query is so slower on ubuntu than Windows
For 99% I bet it's a CPU TOPOLOGY (both HW and VM may have the same) vs OS LICENSING.
While LINUX KERNEL utilizes all CPU's the WINDOWS limit those number to valid license type. e.g. for W10  PRO AND STANDARD EDITION it is a 2.
So in short - your COMPUTING POWER is limited on WINDOWS OS
while ON LINUX KERNEL IT MIGHT BE ONLY A GOVERNOR to tune the speed of OP's.
Other thing to consider is the utilization of raw or shared mem under those OSes or setting for hyperthreading memory interleaving etc.
Generally all other OS implementation that tries to utilize all those &quot;advanced hw speedup techs&quot; to run OPs.
I have encountered such a situation myself - running a 64 core HP server on a VM with a badly copied topology under unlicensed Windows 10 queries results took very long time (about 5 minutes) when normally under full licensed (64cores) Windows server it took 10 seconds. it all depends on the operating software (use of MT, HT, governors, thread locking etc).