Skip to content

Resumable Ignored if timestamp/rowversion is in Include #957

@LikenessWeb

Description

@LikenessWeb

Description of the issue
I am running IndexOptimize with Resumable = 'Y' and a TimeLimit. I found that many of my indexes rebuild commands were not Resumable. After further inspection I found that it indicated the index had a timestamp/rowversion field in the index. However, it was in the INCLUDE, not the actual key of the index. I was able to run a manual ALTER INDEX command with Resumable and it ran properly as a resumable rebuild. I ended up patching the script where it builds @tmpIndexesStatistics and added index_column.is_include_column = 0 to the check for isTimestamp.

SQL Server version and edition
Microsoft SQL Server 2019 (RTM-CU32) (KB5054833) - 15.0.4430.1 (X64)
Feb 21 2025 17:28:26
Copyright (C) 2019 Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2022 Standard 10.0 (Build 20348: ) (Hypervisor)

Version of the script
2025-08-23 17:25:24

What command are you executing?
IndexOptimize

What output are you getting?
ALTER INDEX REBUILD but RESUMABLE = OFF

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions