关于性能:最快的SQL Server协议?

Fastest SQL Server protocol?

什么是最快的SQL Server连接协议?

相关:哪些协议可用于远程协议还是本地协议,这会影响对最快协议的选择吗?


VIA。这是最快的SQL协议,它在专用硬件上运行,并用于执行SQL Server基准记录。

Note that the VIA protocol is deprecated
by Microsoft, and will be removed in a
future version of Microsoft SQL Server.
It is however supported in SQL Server 2008,
SQL Server 2008 R2 and SQL Server 2012.

下一个性能是共享内存,但是它仅在可以实际共享内存的客户端和服务器之间起作用,因此只能在本地使用。

对于普通硬件上的远程连接,TCP是必经之路。在正常操作下,它具有与命名管道相同的性能。在慢速或繁忙的网络上,它在健壮性和速度方面都优于NP,MSDN中记录的事实:

For named pipes, network
communications are typically more
interactive. A peer does not send data
until another peer asks for it using a
read command. A network read typically
involves a series of peek named pipes
messages before it starts to read the
data. These can be very costly in a
slow network and cause excessive
network traffic, which in turn affects
other network clients.

命名管道还可能导致客户端连接超时:

TCP/IP Sockets also support a backlog
queue. This can provide a limited
smoothing effect compared to named
pipes that could lead to pipe-busy
errors when you are trying to connect
to SQL Server.

不幸的是,正常的客户端配置首先尝试NP,这可能会导致连接问题(由于上述原因),其中在客户端网络配置上(或通过tcp:servername在连接字符串中)强制执行TCP会跳过NP连接尝试并继续进行直接在负载下获得更好的体验。

现在的确是,我上面引用的同一链接继续赞扬NP的易配置性,很可能是指无需在防火墙中打开SQL TCP端口,但是我和BOL在这里有不同的看法。铅>


本地共享内存(客户端和服务器在同一台计算机上)最快。命名管道可能是第二本地禁食的。对于远程用户,每个人都在使用TCP-IP,而其余协议则变成了网络历史。


命名管道是最快的SQL Server协议。


使用共享内存协议

在安装SQL Server时选择的网络库可能会影响服务器与其客户端之间的通信速度。在这三个主要的网络库中,TCP / IP是最快的,而多协议是最慢的。由于速度优势,您将希望在服务器和客户端上都使用TCP / IP。另外,请勿在服务器上安装未使用的网络库,因为它们只会造成不必要的开销**