Rebuilding indexes on 5TB database

Chaitanya Kiran 101 Reputation points
2020-08-25T18:58:25.03+00:00

We have a 5TB database. Rebuild index job is taking days to complete. Is there any way to rebuild chunk of indexes?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,000 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tom Phillips 17,741 Reputation points
    2020-08-25T19:55:23.753+00:00

    Use Ola's scripts and use the "TimeLimit" setting. It does not stop at the TimeLimit, it does not start a new index after the TimeLimit is reached.

    https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html

    1 person found this answer helpful.
    0 comments No comments

  2. Cris Zhan-MSFT 6,636 Reputation points
    2020-08-26T07:37:23.473+00:00
    1 person found this answer helpful.

  3. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-08-26T08:21:41.957+00:00

    SQL Server 2017 introduced resumable index rebuilds. Ie., you can pause an online index rebuild and later on continue it. SQL Server 2019 expanded this to resumable index create.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.