Low CPU Load Delays with SQL

Use WAITFOR to pause scripts while using minimal CPU overhead.

WAITFOR TIME '09:15'; --Wait until 9:15am
 
WAITFOR DELAY '00:00:05' --Wait for 5 seconds

It is NOT advisable to introduce delays into scripts while transactions are open. 

Reference: http://msdn.microsoft.com/en-us/library/ms187331.aspx

Posted in SQL Tips, Tips

Leave a Reply

Your email address will not be published. Required fields are marked *

*