Running a profiler trace on one of our servers (SQL2005 SP2) and filtering for all Duration >=2500 I see lots of incidents of trivial statements taking several seconds to complete.
For example:
SP:StmtCompleted -
TextData = "exec sp_reset_connection"
StartTime = 11:06:19
EndTime = 11:06:27
CPU = 0
READS = 0
WRITES = 0
DURATION = 8703
SP:StmtCompleted -
TextData = "select convert(sysname, serverproperty(N'servername'))"
StartTime = 11:06:21
EndTime = 11:06:27
CPU = 0
READS = 0
WRITES = 0
DURATION = 5517
SP:StmtCompleted -
TextData = "if @info_filter = 1"
StartTime = 11:06:28
EndTime = 11:06:34
CPU = 0
READS = 0
WRITES = 0
DURATION = 5476
Any thoughts on why Profiler might report these statements as taking so long to complete?
Do I trust it?
From a general performance point of view, there windows server has plenty of CPU and memory in reserve, and there appears to be no significant blocking taking place.
We are running merge replication on this server, replicating to 3 subscribers, each of which is running local pull subscriptions.