views:

208

answers:

0

The Locks performance object on SQL Server provides three counters that I'm interested in.

X = Average Wait Time (ms)
Y = Lock Wait Time (ms)
Z = Lock Waits/sec

From their descriptions I'd have imagined that X = Y / Z. However, while this is true for SQL2005, it does not seem to be true for SQL2000.

I have some code that forces a deadlock. Running it on SQL2005 I get these results in Perfmon:

X = 4000
Y = 7992.076
Z = 1.998

But on SQL2000 I get this:

X = 6523.522
Y = 6523.522
Z = 1.998

Which of X and Y / Z is a correct representation of the average time per wait?

My guess would actually be Y / Z, because MS apparently changed the type of Average Wait Time (ms) from PerformanceCounterType.SampleCounter (2000) to PerformanceCounterType.AverageCount64 (2005, 2008), and reading the documentation, AverageCount64 seems more appropriate.

Thanks.