SDU Tools: Sleep
Most of the time, we want SQL Server T-SQL queries to run as fast as possible, just the same as we want programs in any programming language to run as fast as possible.
But there are times when you want SQL Server to just sleep for a while, and without tying up system resources (like spinning around on the CPU).
Example of this would be waiting for new entries in Service Broker queues, or waiting to retry deadlocks.
2017-11-10