|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 11:23 AM
Points: 158,
Visits: 489
|
|
1. Does index rebuild on a partitioned aligned index for an individual partition causes any locks on other partitions? 2. Does REORGANIZE on a table causes any locks?
Thanks
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 5:35 PM
Points: 5,722,
Visits: 6,194
|
|
Lexa (9/25/2012)
2. Does REORGANIZE on a table causes any locks?
Can't answer #1, not sure.
Reorganize will take a SCH-S lock to keep the metadata straight. It will also take S locks on the data as it processes, and should take an IX lock at the table level to keep anything from escalating to table level, but I'm not sure about that last one. Shouldn't be too hard to test but I don't have anything right now with large enough data that I can 'catch it' in stream to directly test.
- Craig Farrell
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions | Forum Netiquette For index/tuning help, follow these directions. |Tally Tables Twitter: @AnyWayDBA
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 11:23 AM
Points: 158,
Visits: 489
|
|
Evil Kraig F (9/25/2012)
Lexa (9/25/2012)
2. Does REORGANIZE on a table causes any locks?
Can't answer #1, not sure. Reorganize will take a SCH-S lock to keep the metadata straight. It will also take S locks on the data as it processes, and should take an IX lock at the table level to keep anything from escalating to table level, but I'm not sure about that last one. Shouldn't be too hard to test but I don't have anything right now with large enough data that I can 'catch it' in stream to directly test.
Ignite shows that a rebuild of an index on a partition caused blocking on inserts into that same table but another, "active" partition. Locks were LCK_M_IX on the insert stmts and LCK_M_SCH_M on the ALTER INDEX REBUILD PARTITION XXX. Is that possible? Can a rebuild on one partition cause blocking on another?
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 11:23 AM
Points: 158,
Visits: 489
|
|
Lexa (9/27/2012)
Evil Kraig F (9/25/2012)
Lexa (9/25/2012)
2. Does REORGANIZE on a table causes any locks?
Can't answer #1, not sure. Reorganize will take a SCH-S lock to keep the metadata straight. It will also take S locks on the data as it processes, and should take an IX lock at the table level to keep anything from escalating to table level, but I'm not sure about that last one. Shouldn't be too hard to test but I don't have anything right now with large enough data that I can 'catch it' in stream to directly test. Ignite shows that a rebuild of an index on a partition caused blocking on inserts into that same table but another, "active" partition. Locks were LCK_M_IX on the insert stmts and LCK_M_SCH_M on the ALTER INDEX REBUILD PARTITION XXX. Is that possible? Can a rebuild on one partition cause blocking on another?
Has anyone experienced a similar issue?
|
|
|
|