File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1019,7 +1019,7 @@ IF EXISTS (SELECT 1 FROM @TipDefinition WHERE tip_id IN (1140) AND execute_indic
10191019WITH allocated_used_space AS
10201020(
10211021SELECT SUM (CAST (size AS bigint ) * 8 / 1024 .) AS space_allocated_mb,
1022- SUM (CAST (FILEPROPERTY (name , ' SpaceUsed' ) AS bigint )) / 1024 . / 1024 AS space_used_mb
1022+ SUM (CAST (FILEPROPERTY (name , ' SpaceUsed' ) AS bigint )) * 8 / 1024 . AS space_used_mb
10231023FROM sys .database_files
10241024WHERE type_desc = ' ROWS'
10251025)
@@ -1032,7 +1032,7 @@ SELECT 1140 AS tip_id,
10321032 @CRLF
10331033 )
10341034FROM allocated_used_space
1035- WHERE space_used_mb * 8 / 1024 . > @UsedToAllocatedSpaceDbMinSizeMB -- not relevant for small databases
1035+ WHERE space_used_mb > @UsedToAllocatedSpaceDbMinSizeMB -- not relevant for small databases
10361036 AND
10371037 @UsedToAllocatedSpaceThresholdRatio * space_allocated_mb > space_used_mb -- allocated space is more than N times used space
10381038 AND
@@ -3437,7 +3437,7 @@ ON t.object_id = ius.object_id
34373437 i .index_id = ius .index_id
34383438WHERE i .type IN (0 ,1 ) -- clustered index or heap
34393439 AND
3440- tos .table_size_mb > @CCICandidateMinSizeGB / 1024 . -- consider sufficiently large tables only
3440+ tos .table_size_mb > @CCICandidateMinSizeGB * 1024 . -- consider sufficiently large tables only
34413441 AND
34423442 t .is_ms_shipped = 0
34433443 AND
Original file line number Diff line number Diff line change @@ -1010,7 +1010,7 @@ IF EXISTS (SELECT 1 FROM @TipDefinition WHERE tip_id IN (1140) AND execute_indic
10101010WITH allocated_used_space AS
10111011(
10121012SELECT SUM (CAST (size AS bigint ) * 8 / 1024 .) AS space_allocated_mb,
1013- SUM (CAST (FILEPROPERTY (name , ' SpaceUsed' ) AS bigint )) / 1024 . / 1024 AS space_used_mb
1013+ SUM (CAST (FILEPROPERTY (name , ' SpaceUsed' ) AS bigint )) * 8 / 1024 . AS space_used_mb
10141014FROM sys .database_files
10151015WHERE type_desc = ' ROWS'
10161016)
@@ -1023,7 +1023,7 @@ SELECT 1140 AS tip_id,
10231023 @CRLF
10241024 )
10251025FROM allocated_used_space
1026- WHERE space_used_mb * 8 / 1024 . > @UsedToAllocatedSpaceDbMinSizeMB -- not relevant for small databases
1026+ WHERE space_used_mb > @UsedToAllocatedSpaceDbMinSizeMB -- not relevant for small databases
10271027 AND
10281028 @UsedToAllocatedSpaceThresholdRatio * space_allocated_mb > space_used_mb -- allocated space is more than N times used space
10291029 AND
@@ -3435,7 +3435,7 @@ ON t.object_id = ius.object_id
34353435 i .index_id = ius .index_id
34363436WHERE i .type IN (0 ,1 ) -- clustered index or heap
34373437 AND
3438- tos .table_size_mb > @CCICandidateMinSizeGB / 1024 . -- consider sufficiently large tables only
3438+ tos .table_size_mb > @CCICandidateMinSizeGB * 1024 . -- consider sufficiently large tables only
34393439 AND
34403440 t .is_ms_shipped = 0
34413441 AND
You can’t perform that action at this time.
0 commit comments