This seems like an age-old question, but I'm rather new to it. I found a few other articles; The general consensus seemed to be that UNIX sockets are faster because they have less overhead, or something, but I also heard that Windows 7 is faster with TCP/IP (Like, twice as fast). I'm deciding on using "127.0.0.1" or "localhost" with my MySQL connections, for what it's worth. What do you guys use?
So what does it matter if Linux sockets are slower or faster then Windows? If you are on Linux, you have to use whatever Linux gives you.
I dunno if Linux has the equivalent of named pipes. I vaguely recall that Linux has a way of using shared memory for interprocess communication. That would be hands down the fastest if it's available and can be used by MySQL.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Well, that's just it, Linux gives me two options that I know of, both TCP/IP and UNIX Sockets. I don't know which to use, or if it matters. I wouldn't know about the third option, but fastest sounds very nice.
Pure guess: TCP/IP is a protocol that is a few layers above direct socket calls. So I would *EXPECT* that the direct socket calls would be a shade faster. Mind you the TCP/IP protocol has overhead on a packet basis, so if your transfers will fit within one or a few packets I wouldn't expect the overhead to be much noticeable.
But I haven't used Linux in about 10 years so I'm possibly way out of date and/or my memory is faulty.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.