To continue reading for free, register below or login
To read more you must become a member of SearchSQLServer.com
');
// -->

To see why a stored procedure is running too many times you will need to review the application code that calls the stored procedure.
As to the long running procedure, you can bring up SQL Server Profiler again and add in the event "SP:StatementStarting" and "SP:StatementCompleted." This will show you each command within the stored procedure and how long each command takes. You can then find the command with the high run time and tune that specific query. Normally, this will be caused by incorrect indexing on one or more tables used by the query.
|