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.
Dig Deeper on SQL Server Stored Procedures
Related Q&A from Denny Cherry
Discover a tool that synchronizes two SQL Server databases allowing changes to one SQL Server database to update on the other. Continue Reading
To avoid performance problems when running multiple instances of SQL Server 2005 with Exchange on Windows SBS, refer to these expert best practices. Continue Reading
After installing SQL Server 2005, the SQL Server tools may not appear in the start menu. Our expert explains how to troubleshoot this problem. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.