Skip to content

Commit 4bab99a

Browse files
authored
Merge pull request BrentOzarULTD#3933 from BrentOzarULTD/copilot/fix-null-ratio-warning
[WIP] Fix sp_BlitzIndex to ignore null ratio on empty tables
2 parents dd770b9 + 205b84d commit 4bab99a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sp_BlitzIndex.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5342,6 +5342,8 @@ BEGIN
53425342
WHERE i.index_id IN (1,0)
53435343
AND cc.non_nullable_columns < 2
53445344
AND cc.total_columns > 3
5345+
AND ip.total_rows > 0
5346+
AND ip.total_reserved_MB >= CASE WHEN (@GetAllDatabases = 1 OR @Mode = 0) THEN @ThresholdMB ELSE ip.total_reserved_MB END
53455347
ORDER BY i.db_schema_object_name DESC OPTION ( RECOMPILE );
53465348

53475349
RAISERROR(N'check_id 26: Wide tables (35+ cols or > 2000 non-LOB bytes).', 0,1) WITH NOWAIT;

0 commit comments

Comments
 (0)