Mysql – Why are the MySQL connections running slower on localhost than through network

MySQL

This is my basic scenario: I have an ASP.NET MVC 3 web application which connects to a MySQL database through MySQL .net connector 6.5.4 . I have this scenario for almost a year, but some weeks ago we had to move all the data to another hard drive (not sure if that is the problem, but …), so I dumped the database, installed everything on this new HD and deployed my system. The problem I'm having is that it got really slow to access a specific page after all this modifications. When I say really slow I mean 30 minutes load time. The problem is: on my machine, pointing to this same database, I don't have this big delay … and they're both running the same version of the system.

Do you guys have any ideas on how to solve this or where to look first?

Best Answer

I would say the first candidate would be reverse DNS lookups, and if you don't need DNS lookups, try to use --skip-name-resolve.