title: Is there a way to time the execution of each iteration of a loop in a stored procedure
body: <p>I have a stored procedure that is taking a long time to execute.  This particular stored procedure calls another stored procedure inside a loop.  I know if I run the stored procedure inside the loop on a specific record its not taking much time (just have not found the offending records).  Is there a way to keep track of the amount of time it takes to execute each iteration of loop?  I would like to store this info off in a table along with id of the record I am working with in that particular iteration in an attempt to identify which records are causing a problem.</p>