Reputation: 11299
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 time interval I'm measuring.
Upvotes: 1
Views: 715
Reputation: 33914
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.
Upvotes: 3