Always we should take care of database server performance but sometimes you need to perform a huge update on your table/tables this will affect performance for concurrent users and they will complain about it.
For example if you have a table contains more than billion row and you want to update a column of this data and your database is accessible 24 hours 7 days a week it is difficult to run this code in simple update statement because a lot of data will be fetch to your memory and a lot of user data will be kicked off out of memory.
So the solution is to use batch update by divide your data in small batches, e.g divide it to update 1000 row at a time and stop for a moment and the update the next 1000 and so on, this will let other users to use share the server with you.
-- SQL update in batches of 1000
WHILE (1 > 1)
UPDATE TOP ( 1000 ) S
SET Price = Price * 1.08
IF @@ROWCOUNT = 0
-- 2 second delay
WAITFOR DELAY '00:00:02'
* the above code is updated version of a code that available online.
Written by: Elmozamil Elamir Hamid