Added index rebuild statement to output for 1180
This commit is contained in:
Родитель
678a8605df
Коммит
2f77ec03ea
|
@ -2620,7 +2620,13 @@ SELECT STRING_AGG(
|
||||||
', row overflow: ', FORMAT(partition_range_row_overflow_size_mb, 'N'),
|
', row overflow: ', FORMAT(partition_range_row_overflow_size_mb, 'N'),
|
||||||
', LOB: ', FORMAT(partition_range_lob_size_mb, 'N'),
|
', LOB: ', FORMAT(partition_range_lob_size_mb, 'N'),
|
||||||
'), present compression type: ', present_compression_type,
|
'), present compression type: ', present_compression_type,
|
||||||
', suggested compression type: ', new_compression_type
|
', suggested compression type: ', new_compression_type,
|
||||||
|
', index rebuild statement: ', CONCAT(
|
||||||
|
'ALTER INDEX ', index_name, ' ON ', schema_name, '.', object_name,
|
||||||
|
' REBUILD', IIF(partition_range = '1-1', '', CONCAT(' PARTITION = <', partition_range, '>')),
|
||||||
|
' WITH (', 'DATA_COMPRESSION = ', new_compression_type, ',',
|
||||||
|
' ONLINE = ON (WAIT_AT_LOW_PRIORITY (MAX_DURATION = 15 MINUTES, ABORT_AFTER_WAIT = SELF)), RESUMABLE = ON);'
|
||||||
|
)
|
||||||
) AS nvarchar(max)), @CRLF
|
) AS nvarchar(max)), @CRLF
|
||||||
)
|
)
|
||||||
AS details
|
AS details
|
||||||
|
|
|
@ -2615,7 +2615,13 @@ SELECT STRING_AGG(
|
||||||
', row overflow: ', FORMAT(partition_range_row_overflow_size_mb, 'N'),
|
', row overflow: ', FORMAT(partition_range_row_overflow_size_mb, 'N'),
|
||||||
', LOB: ', FORMAT(partition_range_lob_size_mb, 'N'),
|
', LOB: ', FORMAT(partition_range_lob_size_mb, 'N'),
|
||||||
'), present compression type: ', present_compression_type,
|
'), present compression type: ', present_compression_type,
|
||||||
', suggested compression type: ', new_compression_type
|
', suggested compression type: ', new_compression_type,
|
||||||
|
', index rebuild statement: ', CONCAT(
|
||||||
|
'ALTER INDEX ', index_name, ' ON ', schema_name, '.', object_name,
|
||||||
|
' REBUILD', IIF(partition_range = '1-1', '', CONCAT(' PARTITION = <', partition_range, '>')),
|
||||||
|
' WITH (', 'DATA_COMPRESSION = ', new_compression_type, ',',
|
||||||
|
' ONLINE = ON (WAIT_AT_LOW_PRIORITY (MAX_DURATION = 15 MINUTES, ABORT_AFTER_WAIT = SELF)), RESUMABLE = ON);'
|
||||||
|
)
|
||||||
) AS nvarchar(max)), @CRLF
|
) AS nvarchar(max)), @CRLF
|
||||||
)
|
)
|
||||||
WITHIN GROUP (ORDER BY object_size_mb DESC, object_name, index_name, partition_range, partition_range_total_size_mb, new_compression_type)
|
WITHIN GROUP (ORDER BY object_size_mb DESC, object_name, index_name, partition_range, partition_range_total_size_mb, new_compression_type)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче