May 6, 2014 at 11:39 pm
Will the SQL server profiler trace duration value will be in -ve?
here is the one i got
Duration Starttime Endtime
-432014-05-06 22:26:07.8872014-05-06 22:26:07.843
how it is possible??
May 7, 2014 at 4:39 am
What do you mean by "-ve"?
And you're right, a negative duration is not really possible. The actual capture of trace events is in microseconds and the GUI in Profiler displays in milliseconds. I have seen that conversion lead to problems. You can change the Profiler GUI to work with microseconds in the options.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 7, 2014 at 4:59 am
-ve --> negative.I got the negative value in one of my statement.
If you see the duration which i have provided is in milliseconds and thats too 43 millisecond.
May 7, 2014 at 5:39 am
So, it's probably a rounding error. The capture of events in trace is in microseconds. Your display is milliseconds.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 7, 2014 at 6:46 am
Probably a rounding error.
Could also be server synching time with domain controller, if this happened between start and end of trace.
May 7, 2014 at 11:39 am
Grant Fritchey (5/7/2014)
So, it's probably a rounding error. The capture of events in trace is in microseconds. Your display is milliseconds.
Then how to rely on it ?
May 7, 2014 at 12:08 pm
SQL doesn't use high-precision timers (too resource intensive). Inaccuracy in the order of a few ms is not a problem. Like most rounding issues, the large numbers are accurate enough and a couple ms here or there is not going to skew performance tests, because you should take multiple tests and average.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 7, 2014 at 12:19 pm
Everything Gail said, plus, remember it does capture the values in microseconds. Just change the display to use those instead of milliseconds and you'll see fewer issues.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply