Skip to content Skip to sidebar Skip to footer

.net To Remote Sql Server Slow On One Machine, Not The Other

I'm developing a .NET 4.0 application on a newly setup Windows 7 desktop. Queries to the remote database are extremely slow in that application. The same application is running pre

Solution 1:

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...

Solution 2:

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

Solution 3:

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.

Solution 4:

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.

Post a Comment for ".net To Remote Sql Server Slow On One Machine, Not The Other"