Press "Enter" to skip to content

Diagnosing Why SYSUTCDATETIME is Faster than SYSDATETIME

Joe Obbish is on a quest:

On my machine the code takes about 11.6 seconds to execute. Replacing SYSDATETIME() with SYSUTCDATETIME() makes the code take only 4.3 seconds to execute. Why is SYSUTCDATETIME() so much faster than SYSDATETIME()?

There’s an interesting answer to the question, so read on.