cpu – asp.net caused the use of mysql 99%

I have an asp.net application that uses Mysql. I test it on the test server running MySQL. When the application is running, it consumes 40% of the CPU. I run the same code on the production server that also runs MySQL, now consumes 99% of the CPU usage. What configuration in the MySQL configuration will affect the level of CPU consumption? Because I am executing the same code but the result is totally different.