Skip to content

RESUMABLE should be 'N' also when a computed column is part of the INCLUDE list #985

@ClaudioESSilva

Description

@ClaudioESSilva

Description of the issue

Despite the MS docs not mentioning this as a limitations' list (it just mentions LOB column as an included column.), it seems that the RESUMABLE option can't also be used when a computed column is used in the INCLUDE list.

Error message:

Msg 10675, Level 16, State 2, Line 17
Internal Query Processor Error: The query processor could not produce a query plan. The RESUMABLE option is not supported for this index build. Remove the RESUMABLE option and rerun the statement.

NOTE: I've already opened a PR to improve the docs.

Easy steps to reproduce the issue:

DROP TABLE IF EXISTS dbo.OrdersWithComputedIncluded
CREATE TABLE dbo.OrdersWithComputedIncluded
(
    OrderID INT IDENTITY(1,1) NOT NULL,
    OrderDate DATETIME NOT NULL,
    CustomerID INT NOT NULL,
    ClientID AS (CustomerID), -- Computed column
    Amount DECIMAL(18,2) NOT NULL,
    CONSTRAINT PK_OrdersWithComputedIncluded PRIMARY KEY (OrderID)
);
GO

CREATE NONCLUSTERED INDEX IX_OrdersWithComputedIncluded_OrderDate
    ON dbo.OrdersWithComputedIncluded(OrderDate)
    INCLUDE (ClientID);  -- Computed column in INCLUDE
GO

INSERT INTO dbo.OrdersWithComputedIncluded (OrderDate, CustomerID, Amount)
VALUES 
    ('2024-01-15', 1, 100.00),
    ('2024-06-20', 2, 250.50),
    ('2025-03-10', 1, 175.25),
    ('2025-11-05', 3, 300.00);
GO

SELECT * FROM OrdersWithComputedIncluded

ALTER INDEX IX_OrdersWithComputedIncluded_OrderDate
    ON dbo.OrdersWithComputedIncluded 
    REBUILD WITH (SORT_IN_TEMPDB = OFF, ONLINE = ON, RESUMABLE = ON);

SQL Server version and edition

Microsoft SQL Azure (RTM) - 12.0.2000.8 Jan 2 2026 13:26:31 Copyright (C) 2025 Microsoft Corporation

Version of the script

Version: 2025-12-20 18:52:13

What command are you executing?

EXEC dbo.[IndexOptimize]
    @Databases = 'db',
    @Indexes = 'db.dbo.[table].[index_with_computed_column_in_as_included_column]',
    @FragmentationLow = 'INDEX_REBUILD_ONLINE',
    @FragmentationMedium = 'INDEX_REBUILD_ONLINE',
    @Resumable = 'Y';

What output are you getting?

Error message:

Msg 10675, Level 16, State 2, Line 17
Internal Query Processor Error: The query processor could not produce a query plan. The RESUMABLE option is not supported for this index build. Remove the RESUMABLE option and rerun the statement.

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