最快的 SQL Server 协议? [英] Fastest SQL Server protocol?

查看:42
本文介绍了最快的 SQL Server 协议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

What is the fastest SQL Server connection protocol?

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

Related: which protocols are available remote versus local, and does that affect the choice of fastest protocol?

推荐答案

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

VIA. This is the fastest SQL Protocol, it runs on dedicated hardware and is used in doing SQL Server benchmarked records.

请注意 VIA 协议已弃用由 Microsoft,并将在Microsoft SQL Server 的未来版本.然而,它在 SQL Server 2008 中受支持,SQL Server 2008 R2 和 SQL Server 2012.

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.

共享内存是次要的性能,但它仅适用于可以实际共享内存的客户端和服务器之间,因此仅限本地.

Shared Memory is next as performance, but it only works between a client and a server that can actually share memory, so local only.

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

For remote connectivity on ordinary hardware, TCP is the way to go. Under normal operations, it has the same performance as Named Pipes. On slow or busy networks, it outperforms NP in robustness and speed, a fact documented in MSDN:

对于命名管道,网络沟通通常更多交互的.对等方不发送数据直到另一个对等方使用读取命令.网络读取通常涉及一系列 peek 命名管道在开始阅读之前的消息数据.这些可能非常昂贵网络慢,导致过度网络流量,进而影响其他网络客户端.

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.

命名管道也会导致客户端连接超时:

Named Pipes also can lead to client connect time outs:

TCP/IP Sockets 也支持 backlog队列.这可以提供有限的与命名相比的平滑效果可能导致管道繁忙的管道尝试连接时出错到 SQL Server.

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 连接尝试,直接进入 TCP 以获得更好的负载体验.

Unfortunately the normal client configuration tries NP first and this can cause connectivity problems (for the reasons cited above), where enforcing TCP on client network config (or in connection string, via tcp:servername) skips the NP connect attempt and goes straight to TCP for a much better experience under load.

现在确实,我上面引用的同一个链接继续称赞NP易于配置,很可能是指无需在防火墙中打开SQL TCP端口,但我和BOL有不同的看法.

Now is true that the same link I quoted above goes on to praise NP for its easy of configuration, most likely referring to no need to open SQL TCP port in firewall, but is there where me and BOL have different views.

这篇关于最快的 SQL Server 协议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆