In tuning a server I came across an interesting note in this MySQL Optimization presentation on the mysql site.

If you run the client and MySQL server on the same machine, use sockets instead of TCP/IP when connecting to MySQL (this can give you up to a 7.5 % improvement). You can do this by specifying no hostname or localhost when connecting to the MySQL server.

In setting up this server, I thought I had a good idea in setting all the hostnames in the data source connections to 127.0.0.1.  I assumed the server wouldn’t have to do the extra translation of a hostname to an ip address.  Sure enough it looks like this does more harm than good by forcing a tcp connection.