-
Notifications
You must be signed in to change notification settings - Fork 840
Description
Indexes of Schemabinded views are not processed by the IndexOptimize SP
Microsoft SQL Server 2022 (RTM-CU21) (KB5065865) - 16.0.4215.2 (X64)
OLA Script:
2025-08-23 17:25:24
What command are you executing?
IndexOptimize
What output are you getting?
Indexes of Schemabinded views are skipped.
Doing some tests, i found the problem sit in the evaluation of "IsMemoryOptimized" field: for those indexes it were given NULL because it was readed from the Tables systable. Forcing it as 0 if NULL in the header of the query fixed the issues, but there should be a more elegant way tofix that.
In addition, this query is undoable in very big databases -> fixed creating temp tables for each sys table used by the query as suggested here to speed up the performance:
Here the creation script reviewed: