• Suth (10/28/2016)


    Hi,

    I'm currently trying delete data from a large database with the below code... But its taking quite a long time to delete 1000 rows the table holds over 1mil records

    Any ideas on how I can improve the performance ?

    The column is indexed and i have tired using rowlock but still no improvement

    Are there any tables with a foreign key to this table? A delete operation requires SQL Server to check to make sure this won't break referential integrity. If there are foreign keyed tables, then one or more of them may not have an index on the foreign keyed columns. You can look at the estimated execution plan of the DELETE to see.