I already offered a solution to empty a SharePoint list at light speed
But this solution hast two big disadvantages:
- You cannot empty a list that has more entries thatn the allowed list view threshold (default is 5000)
- All Lookups will be lost
This solution has non of those drawbacks. It is much slower than that solution but also much faster than “normal” deletion of SPListItems or using a Caml-Query to do that.
Just be asure that this is not thread-safe. So make sure noone is writing into that list in the same time or that lines might not be deleted.