Minimizing locking while archiving rows from a main table in SQL Server T-SQL
I’ve mentioned before that I really don’t mind working with large tables. They’re only slow to use if you’re looking through all the rows when trying to find the data that you want. But there is still sometimes a valid need to archive data from a main table, across into an archive table. And people often run into problems, particularly blocking problems, when they try to do that.
Let’s start with an example pair of tables (much simplified for clarity):
2020-02-27

