SQL Server ODBC Performance Failure?

This is strange, but I hope someone can help me.

I have a stored procedure call that takes about 42 seconds to run - when called from an application connected with an ODBC connection. However, if I run the same call in SSMS (Sql Server Management Studio), to complete ... it only takes 10 or 15 seconds ....

This is not a network problem. I transfer only 1200 records to the client - and in any case, the time I gave you came directly from the trace duration field ... because it takes SQL Server 3 or 4 times longer to process the same call - when executed through a call ODBC I can repeat it over and over again. What is more interesting is that reading and writing (taken from the trace) is slightly higher for an ODBC call, but CPU utilization is 3 or 4 times more than an SSMS call.

There are other stored procs that are called part of the same process, and they do not seem to be affected equally ... or at least not to the same extent.

We are using SQL Server 2005

Any ideas on what's going on here?

+3
source share
2

, "" SSMS. proc SSMS , :

CHECKPOINT
GO
DBCC DROPCLEANBUFFERS
GO
DBCC FREEPROCCACHE
GO

-- Your SQL begins here

@Martin , sniffing . SO, .

+1

. ? , , .

0

Source: https://habr.com/ru/post/1792096/


All Articles