MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
Query time out with sql server - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

Query time out with sql server

Last post 11-10-2007 11:10 AM by admin. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-30-2007 1:41 PM

    • samkry
    • Top 50 Contributor
    • Joined on 10-30-2007
    • Posts 4

    Query time out with sql server

    Hi,

    Does anyone know how do I use the profiler or performance monitor to identify which stored procedure need to be recompile? I think as the best practice before we go and dig more details with the performance issue, do a recompilation in the first place will help dba to shorten the investigating the cause.

    Of coz I know there are many many thing need to be consider in order to hunt for the performance issue, but I strongly believe a recompilation is the first attempt to resolve a problem with query time out. 

  • 11-03-2007 10:10 AM In reply to

    Re: Query time out with sql server

    Samkry,

    I am not aware of any SQL Server related configuration that will time out a query.  Some middle tier applications and web servers will do so, but I am not familiar with any default configuration that will stop a query from running.

    As far as capturing the recompiled stored procedures, Profiler would be the right tool to capture the metrics.  Once you load Profiler, click on the Events Selection Tab, then click on the 'Show all Events' check box on the bottom right, scroll down to Stored Procedures and select the SP:Recompile check box.  Run Profiler to capture the metrics then review the results to see if your hunch is correct.

    Here are some tips related to Profiler to help you get started:

    If you are having a performance problem, check out the Performance Tuning category on the web site - http://www.mssqltips.com/category.asp?catid=9

    Good luck and let us know if this works!

    Thank you,
    The MSSQLTips.com Team

  • 11-06-2007 9:25 AM In reply to

    • samkry
    • Top 50 Contributor
    • Joined on 10-30-2007
    • Posts 4

    Re: Query time out with sql server

     Hi,

    Yes u are rite, sql profiler will do the job, but what is the criteria to indicate that is the procedure that causing the performance issue? shoul i says all query above 1 sec must be recompile ? 

  • 11-10-2007 11:10 AM In reply to

    Re: Query time out with sql server

    Samkry,

    These events in Profiler are what you need: Stored Procedures and select the SP:Recompile.

    The a long execution time for a stored procedure does not necessarily mean that it is recompiling.

    Thank you,
    The MSSQLTips.com Team

Page 1 of 1 (4 items)