Friday, February 24, 2012

Create index + blocking

Would a Create Index on a table cause blocking on the table for the entire
length of the duration ?
I should add that creating a clustered index causes an exclusive lock, where a non-clustered index
cause a shared lock.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:ek4XupkbFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Would a Create Index on a table cause blocking on the table for the entire
> length of the duration ?
>
|||Yes. In 2005, you will have an ONLINE option.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:ek4XupkbFHA.3184@.TK2MSFTNGP15.phx.gbl...
> Would a Create Index on a table cause blocking on the table for the entire
> length of the duration ?
>
|||An exclusive lock at the table for the entire duration or at a lower
granularity such as page which would then be intermittent blocking ?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uSWCTVlbFHA.2520@.TK2MSFTNGP09.phx.gbl...
> I should add that creating a clustered index causes an exclusive lock,
where a non-clustered index
> cause a shared lock.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
news:ek4XupkbFHA.3184@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
entire
>
|||When building a clustered index, SQL Server has to completely reorganize the
entire table, so it gets an exclusive table lock for the duration.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:O0MUk2vbFHA.1392@.TK2MSFTNGP14.phx.gbl...
> An exclusive lock at the table for the entire duration or at a lower
> granularity such as page which would then be intermittent blocking ?
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> message news:uSWCTVlbFHA.2520@.TK2MSFTNGP09.phx.gbl...
> where a non-clustered index
> news:ek4XupkbFHA.3184@.TK2MSFTNGP15.phx.gbl...
> entire
>

No comments:

Post a Comment