Partition locks are an attribute of a partitioned table and are applicable to all types of partitioning.
For information about other types of locks, see Performance and Tuning Series: Locking and Concurrency Control.
Statement | Allpages-Locked Table | Datarows-Locked Table |
---|---|---|
select balance from account where acct_number = 25 |
Intent shared partition lock Shared page lock |
Intent shared partition lock Shared row lock |
insert account values (34, 500) |
Intent exclusive partition lock Exclusive page lock on data page Exclusive page lock on leaf index pages |
Intent exclusive partition lock Exclusive row lock |
delete account where acct_number = 25 |
Intent exclusive partition lock Update page locks followed by exclusive page locks on data pages and leaf-level index pages |
Intent exclusive partition lock Update row locks followed by exclusive row locks on data rows |
update account set balance = 0 where acct_number = 25 |
Intent exclusive partition lock Update page locks followed by exclusive page locks on data pages and leaf-level index pages |
Intent exclusive partition lock Update row locks followed by exclusive row locks on data rows. |