Online rebuild index ABORT_AFTER_WAIT = NONE

sakuraime 2,326 Reputation points
2020-08-27T10:07:41.16+00:00

ALTER INDEX clidx ON parttable REBUILD
WITH (ONLINE=ON (WAIT_AT_LOW_PRIORITY ( MAX_DURATION = 5 minutes
,ABORT_AFTER_WAIT = NONE)))

So in this case, the rebuild index will wait for another 5 minutes, if it was first blocked already by 5mins ??? to complete the acquire the sch-m lock ?

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

Accepted answer
  1. CathyJi-MSFT 21,861 Reputation points Microsoft Vendor
    2020-08-28T03:20:02.203+00:00

    Hi @sakuraime ,

    The ABORT_AFTER_WAIT parameter comes with three options:

    •NONE: The online index rebuild operation will be returned to the wait queue after the wait time is expired, changing the low priority wait into normal wait priority. This will work same as previous SQL Server versions. This option helps in giving other queries time, equal to MAX_DURATION, to proceed without any blocking.

    •SELF: The online index rebuild operation will be rolled back if it is not completed after specific time equal to MAX_DURATION, giving the priority to other user actions instead of the online index rebuild operation.

    •BLOCKERS: All transactions that are blocking the online index rebuild operation will be killed if the blocking still occurring after expiring the MAX_DURATION time. So that you can easily rebuild the index.

    Please refer to the blog How to control online Index Rebuild Locking using SQL Server 2014 Managed Lock Priority.

    Best regards,
    Cathy

    ===============================================

    If the response helped, do "Accept Answer" and upvote it.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-08-27T11:04:44.35+00:00

    No, it means that it will start using the regular locking mechanisms, immediately. As if you didn't specify low priority.

    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.