Finding the slow stored procedures from a Trace file

117 Views Asked by At

Client from their production environment send me a trace file. I want to know which stored procedures are taking longest.

The things they record in the trace file include: RPC:Starting , RPC:Completed

I noticed in in the trace columns we have both StartTime/EndTime and also Duration.

Which one should I use for my purpose?

And to know how long a SP took, so Should I find the difference between StartTime of RPC:Starting and EndTime of RPC:Completed?

1

There are 1 best solutions below

1
On

If it helps, you can run the Stored Procedure using the Display Estimated Execution Plain (CTRL + L) tool contained in SQL Management Studio.

enter image description here

It will demonstrate the cost of time and execution of each.

I hope I have helped.