开发者

What could be causing slow function import performance?

开发者 https://www.devze.com 2023-03-23 09:45 出处:网络
I have a sto开发者_如何学Gored procedure that finishes execution after a few ms when I run it by itself.However, once I import the stored procedure into EF and call it with the same exact parameters,

I have a sto开发者_如何学Gored procedure that finishes execution after a few ms when I run it by itself. However, once I import the stored procedure into EF and call it with the same exact parameters, it takes like 5 minutes to finish. Is there some kind of setting I need to tweak or what is causing this slowness?


I've seen people have this issue when SQL Server has a bad cached execution plan. People seem to recommend running the following commands to fix it:

DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE

See Stored procedure slow when called from web, fast from Management Studio for a more complete answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消