Skip to content

Commit f41284e

Browse files
committed
#1697 sp_BlitzIndex skip partitions checking
If TableName is specified. Closes #1697.
1 parent 003e069 commit f41284e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sp_BlitzIndex.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ SET @NumDatabases = @@ROWCOUNT;
678678
/* Running on 50+ databases can take a reaaallly long time, so we want explicit permission to do so (and only after warning about it) */
679679

680680
BEGIN TRY
681-
IF @NumDatabases >= 50 AND @BringThePain != 1
681+
IF @NumDatabases >= 50 AND @BringThePain != 1 AND @TableName IS NULL
682682
BEGIN
683683

684684
INSERT #BlitzIndexResults ( Priority, check_id, findings_group, finding, URL, details, index_definition,
@@ -1028,7 +1028,7 @@ BEGIN TRY
10281028

10291029

10301030
RAISERROR (N'Checking partition count',0,1) WITH NOWAIT;
1031-
IF @BringThePain = 0 AND @SkipPartitions = 0
1031+
IF @BringThePain = 0 AND @SkipPartitions = 0 AND @TableName IS NULL
10321032
BEGIN
10331033
/* Count the total number of partitions */
10341034
SET @dsql = N'SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

0 commit comments

Comments
 (0)