Oct
31
2008

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

Written by John in: SQL Tips,Tips |

No Comments »

RSS feed for comments on this post. TrackBack URL

Leave a comment