Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit efd02bd

Browse files
BrentOzarULTD#1138 sp_BlitzIndex correcting number of NCLs on blocked indexes
Was only counting the number of indexes with lock waits. Closes BrentOzarULTD#1138.
1 parent 5b05d1d commit efd02bd

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
@@ -2148,7 +2148,7 @@ BEGIN;
21482148
N'http://BrentOzar.com/go/AggressiveIndexes' AS URL,
21492149
i.db_schema_object_indexid + N': ' +
21502150
sz.index_lock_wait_summary + N' NC indexes on table: ' +
2151-
CAST(SUM(CASEWHEN index_id NOTIN (0,1) THEN1ELSE0END)
2151+
CAST(COALESCE((SELECTSUM(1) FROM #IndexSanity iMe INNER JOIN #IndexSanity iOthers ONiMe.database_id=iOthers.database_idANDiMe.object_id=iOthers.object_idANDiOthers.index_id>1WHEREi.index_sanity_id=iMe.index_sanity_id),0)
21522152
AS NVARCHAR(30)) AS details,
21532153
i.index_definition,
21542154
i.secret_columns,
@@ -2173,7 +2173,7 @@ BEGIN;
21732173
N'http://BrentOzar.com/go/AggressiveIndexes' AS URL,
21742174
i.db_schema_object_indexid + N': ' +
21752175
sz.index_lock_wait_summary + N' NC indexes on table: ' +
2176-
CAST(SUM(CASEWHEN index_id NOTIN (0,1) THEN1ELSE0END)
2176+
CAST(COALESCE((SELECTSUM(1) FROM #IndexSanity iMe INNER JOIN #IndexSanity iOthers ONiMe.database_id=iOthers.database_idANDiMe.object_id=iOthers.object_idANDiOthers.index_id>1WHEREi.index_sanity_id=iMe.index_sanity_id),0)
21772177
AS NVARCHAR(30)) AS details,
21782178
i.index_definition,
21792179
i.secret_columns,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /