标签:
如果对分区表配置锁升级选项设置为Auto(设置 Lock_Escalation 为 auto),那么对表加锁的最大粒度是Partition,这样能在一定程度上提高表的并发度,提高更新速度,甚至防止发生deadlock。
Syntax
ALTER TABLE [ schema_name . ] table_name SET ( LOCK_ESCALATION = { AUTO | TABLE | DISABLE } )
SET ( LOCK_ESCALATION = { AUTO | TABLE | DISABLE } )
Specifies the allowed methods of lock escalation for a table.
Sample
Allowing lock escalation on partitioned tables
The following example enables lock escalation to the partition level on a partitioned table. If the table is not partitioned, lock escalation is to the TABLE level.
ALTER TABLE T1 SET (LOCK_ESCALATION = AUTO);
参照文档:
https://msdn.microsoft.com/en-us/library/ms190273(v=sql.105).aspx
标签:
原文地址:http://www.cnblogs.com/ljhdo/p/5041597.html