MySQL Connection Response Slow on Windows 2008 / 2012
One of the reasons why a PHP / MySQL combo seems so “slow” with regards to response times when moving from Windows 2003 (IIS6) to Windows 7/2008 (IIS7) / 2012 (IIS8), is the way many scripts connect to MySQL and having IPv6 enabled by default.
Many server installations leave WordPress or other PHP script installs to default to “localhost” when connecting to MySQL. Windows 7, 2008, 2012 have an issue with resolving localhost when IPv6 is enabled. With iishacks.com, the initial response time from MySQL goes from 600ms (using localhost) down to 70ms (using 127.0.0.1).
If your issue is initial response time, but MySQL seems to function well otherwise, your connection string may be at fault. Instead of disabling IPv6, try changing “localhost” to “127.0.0.1″ in your scripts and see if the response times improve.