From the course: Advanced SQL for Application Development

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Avoiding index locks

Avoiding index locks

From the course: Advanced SQL for Application Development

Start my 1-month free trial

Avoiding index locks

- [Instructor] Now, another issue we can run into in production that's related to indexing, is something called an index Lock. Now, an index Lock can occur when we need to rebuild an index. Now you may wonder why we'd ever need to rebuild and index. Well in theory we shouldn't, however in practice sometimes there are errors in the index, like an index may become corrupted, because of a software bug or something that causes the data in the index to become invalid. And so it needs to be corrected and the most effective and reliable way to do that, is by rebuilding an index. But even if it's not an error, you may learn things about the, sort of the characteristics about how your database is being used, and you may decide after some period of time that you want to adjust maybe some of the storage parameters, in your create index clause. Well if that's the case you going to need to rebuild the index. Also there are some unusual…

Contents