• When I first read through the code, my first thought was that load on the system would impact the calculations. So I did a quick and dirty test, taking advantage of a big, ugly query I had. I added a timer to the whole getdate loop and ran with no other queries running. Then I started up 5 independent queries and ran the getdate loop. The load definitely impacted the calculation. (Note: this was run on SQL 2005 server.)

    -- test impact of load on getdate() calculation.

    -- (normal load on system)

    16718

    3.34807

    loop getdate 55973 Milliseconds duration

    -- start up 5 big, ugly queries

    49369

    5.01339

    loop getdate 247506 Milliseconds duration