deletion of 2 million records

  • One very important thing has been missed in this thread (and in Lynn's article from my quick review): error checking and explicit transaction begin/rollback/commit.

    I also didn't see any mention of creating an index on the relevant 'driver field' if necessary and testing the first delete batch to make sure you get index seeks on the deletes otherwise you can wind up with table scans and blocking the entire table which is usually a big no-no on production tables. It will often be faster to do this as well (at least on sizeable tables) so it is a win/win. I note that this may have been in Lynn's article - I just did a quick review for error checking.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing post 31 (of 30 total)

You must be logged in to reply to this topic. Login to reply