Faced performance problem with an internal WordPress site.
I changed the settings below and my speed improvement went from +1650ms to 450ms.
The default is set to localhost.
/** MySQL hostname */
define('DB_HOST', 'localhost');
Change this to 127.0.0.1
/** MySQL hostname */
define('DB_HOST', '127.0.0.1');