Is it faster to connect/use MySQL at localhost instead of a domain (even if the domain resolves to the same computer)?

后端 未结 3 2035
野的像风
野的像风 2021-01-17 10:32

If I have MySQL running on a Linux box, is it faster to run queries if connected to localhost than if I connect to a domain which resolves to the same box? This is from Java

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-17 10:37

    Using 127.0.0.1 is even faster than localhost as it directly points to the IP

提交回复
热议问题