开发者

DataAdapter.Fill - Does it execute the stored procedure?

I need to capture how long it takes for my application to execute a stored procedure. The results of the procedure are being stored in a dataset by a DataAdapter. My question is does DataAdapter.Fill execute the stored procedure? If so I know I'm measuring the correct "start" point for the tim开发者_开发问答e interval I'm measuring.


If you need to measure it directly, why not use SQL Profiler? That way, you can capture the RCP Begin and End events, and know exactly how long the execution took on the database server.

From your application's perspective, though, .Fill does execute the SP when it populates the Dataset, so seeing how long this .Fill takes will give you a picture of how long the SP takes, including network latency and the processing of the .NET framework, which will add some slight overhead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜