Efficient deletion of records from the MSSQL table with many varchar(MAX) fields

15 September 2026

This method could be helpful if problem is not index related. Adjust TOP value to any number that works for you.

WHILE 1 = 1
BEGIN
    DELETE TOP (500) FROM SomeLogTable WHERE ...;
    IF @@ROWCOUNT = 0
        BREAK;
END