The Profiler is the preferred method for profiling stored SQL objects. But you can also use can use system procedures to view procedure profiling information for stored procedures, functions, events, system triggers, and triggers.
Perform procedure profiling by enabling procedure profiling and executing these system procedures:.
The sa_procedure_profile system procedure shows in-depth profiling information, including execution times for the lines within each object; each line in the result set represents an executable line of code in the object.
The sa_procedure_profile_summary system procedure shows you the overall execution time for each object, giving you a summary of all objects that ran; each line in the result set represents the execution details for one object.
When reviewing the results from these system procedures, there may be more objects listed than those specifically called. This is because one object can call another object. For example, a trigger might call a stored procedure that, in turn, calls another stored procedure.