Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

What will cause no lock escalation to table lock in deleting more than 300,000 rows in a table in SQL Server 2008 R2?

$
0
0

I deleted 300,000 rows in a table in SQL Server 2008 R2.   I checked the locks information by querying sys.dm_tran_locks when the delete statement was running.

delete top (300000)  from log where logdatetime < getdate(); -- there is a non-unique, non-clustered index for column logdatetime

I expected to see object/table exclusive lock but only found page and extent exclusive locks.  I have checked that the lock escalation of the table log is still set to default (table).   What are the possible reasons for no lock escalation to table lock?


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>