开发者

Measure stored procedure duration

In my application I want to know the execution time for a stored procedure. My pattern is to execute reader and get the data reader and read the results. The reader ret开发者_开发技巧urn immediately and I don’t know the stored procedure execution time. I cannot put the timers after the reader because I want to have an extension method to encapsulate just the execute reader call. Do you have any idea how I can achieve that?

Thanks, Radu


That's not possible with a datareader because the datareader won't actually get the data untill you start reading from it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜