Home Forums SQL Server 7,2000 Strategies Batch Delete is Slow :angry: RE: Batch Delete is Slow :angry:
yuvipoy
SSChampion
Points: 10469
More actions
March 28, 2014 at 6:56 am
#1701070
Here in the KB article SET ROWCOUNT has been used to delete large records.
http://support.microsoft.com/kb/323630
SET ROWCOUNT 500
delete_more:
DELETE FROM LogMessages WHERE LogDate < '2/1/2002'
IF @@ROWCOUNT > 0 GOTO delete_more
SET ROWCOUNT 0