SQL Server ODBC performance penalty? -


this bizarre, hoping can me out.

i have stored procedure call takes 42 seconds run – when called application connected odbc connection. however, if run same call in ssms (sql server management studio), takes 10 or 15 seconds execute….as recorded trace.

this not appear network issue. passing 1200 records client – , in case, times gave coming straight trace duration field….so taking sql server 3 or 4 times longer process same call – when done via odbc call. can reproduce on , on again. more interesting, reads , writes (taken trace) little higher odbc call, cpu usage 3 or 4 times ssms call is.

there other stored procs called part of same process, , not appear affected in same way...or @ least not same extent.

we using sql server 2005

any ideas going on here?

could pulling data "warmed" cache in ssms. try running these lines before stored proc call in ssms , see if runs quickly:

checkpoint go dbcc dropcleanbuffers go dbcc freeproccache go  -- sql begins here 

as @martin says result of parameter sniffing. here post goes on that.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -