Can I pause or resume an index rebuild operation?

Guy-Glantser, 2017-11-16

One of the cool new features in SQL Server 2017 (and currently also in public preview in Azure SQL Database) is the option to pause and resume an online index rebuild operation.

This option can be useful for several use cases. Imagine you have a very large index, which takes approximately 5 hours to rebuild online. A lot of things can happen during those 5 hours.

For a start, you might not have enough time within your maintenance window to complete the operation. Now you can configure the operation to run for 3 hours and then pause automatically. You can then resume the operation during the next maintenance window. Of course, this means that SQL Server will have to maintain both old and new indexes until the new index is completely ready. But depending on your workload and policy, this might be a better option than to continue to rebuild the index outside of the maintenance window.

Another interesting use case is when the rebuild operation fails after 4 hours out of 5. It might fail because the disk is full or because there was a failover of the database to another replica or because of some other error. If you started the online index rebuild operation in resumable mode, then all the work that was performed during those 4 hours is not lost. You can simply resume the operation in the new replica (or after you free some disk space).

For more information, see ALTER INDEX and Guidelines for Online Index Operations.

The post Can I pause or resume an index rebuild operation? appeared first on Madeira Data Solutions.

Rate

Share

Share

Rate

Related content

Database Mirroring FAQ: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup?

Question: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? This question was sent to me via email. My reply follows. Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future.

Robert Davis

2009-02-23

1,567 reads

Networking – Part 4

You may want to read Part 1 , Part 2 , and Part 3 before continuing. This time around I’d like to talk about social networking. We’ll start with social networking. Facebook, MySpace, and Twitter are all good examples of using technology to let…

Andy Warren

2009-02-17

1,530 reads

Speaking at Community Events – More Thoughts

Last week I posted Speaking at Community Events – Time to Raise the Bar?, a first cut at talking about to what degree we should require experience for speakers at events like SQLSaturday as well as when it might be appropriate to add additional focus/limitations on the presentations that are accepted. I’ve got a few more thoughts on the topic this week, and I look forward to your comments.

Andy Warren

2009-02-13

360 reads