.NET to remote SQL Server slow on one machine, not the other

折月煮酒 提交于 2019-11-30 16:13:27

Finally, after days of trying all kinds of different settings, and even reinstalling everything (including Windows) from scratch, I somehow figured out the problem. It was - and I still can't believe this - the network card settings. I disabled "IPv4 Checksum Offload", "Large Send Offload (IPv4)", "TCP Checksum Offload (IPv4)", and "UDP Checksum Offload (IPv4)". Now it's nice and fast...

Tomas Voracek

Well, i've experienced something similar in our app. Beware that ManagementStudio results may led you to incorrect conclusions. There is a parameter ARITHABORT on connection which is by default set to ON in MS, but from your app it is always OFF by default.

Links:

SQL Server ARITHABORT

https://stackoverflow.com/questions/2465887/why-would-set-arithabort-on-dramatically-speed-up-a-query

Run a trace on the DB server and see what actual SQL statements are actually being run against it. I have a feeling your EF generates diff SQL than what you have in management studio. You may need to optimize it. VPN connection could also be part of the problem.

Same thing happed to me and I spent days trying to figure it out. Queries from Entity Framework and ADO.NET to a remote SQL Server from my workstation would run extremely slow, but fast on all the other developer's stations. Disabling the Large Send Offload V2 (IPv4) immediately solved the problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!