You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found the issue.
commenting out the subquery related to the resumable index fixed the issue.
`+ ',0 AS ResumableIndexOperation'`
` --+ ', ' + CASE WHEN @Version >= 14 THEN 'CASE WHEN EXISTS(SELECT * FROM sys.index_resumable_operations index_resumable_operations WHERE state_desc = ''PAUSED'' AND index_resumable_operations.object_id = indexes.object_id AND index_resumable_operations.index_id = indexes.index_id AND (index_resumable_operations.partition_number = partitions.partition_number OR index_resumable_operations.partition_number IS NULL)) THEN 1 ELSE 0 END' ELSE '0' END + ' AS ResumableIndexOperation'`
Btw, can try dumping sys.index_resumable_operations into a temp #Tmp_index_resumable_operations table and base original query on it instead, to test if this speeds up performance on 3TB databases.
Running update statistics on a 3Tb database is very slow
SQL server 2022 ENT
Last version of the script
Command:
EXECUTE dbo.IndexOptimize
@databases = 'ABC',
@FragmentationLow = NULL,
@FragmentationMedium = NULL,
@FragmentationHigh = NULL,
@UpdateStatistics = 'Index',
@OnlyModifiedStatistics = 'Y',
@LogToTable = 'Y',
@MSShippedObjects = 'Y',
@execute = 'N'
The text was updated successfully, but these errors were encountered: