• subscribe
November 23, 2004 12:00 AM

Varying Event Durations Can Point to Compilation Problems

SQL Server Pro
InstantDoc ID #44307

When I use SQL Server Profiler to track performance problems, I sometimes notice large differences—as much as 2 or 3 seconds—between the duration for the SQL:BatchCompleted event and the SQL:StmtCompleted event. Why are the duration times different?

Generally speaking, the difference between a SQL:BatchCompleted event's duration time and a SQL:StmtCompleted event's duration time is how long each event takes to parse and compile a query. SQL Server can usually parse and compile a batch quickly. However, sometimes a batch is complicated or other stresses on the system cause the compilation time to become a significant part of the time it takes SQL Server to run a query. So, large differences between the duration of SQL:BatchCompleted and SQL:StmtCompleted events can point to queries that have compilation problems.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...