Skip to content

Commit 36f4e72

Browse files
authored
Merge pull request #3557 from BrentOzarULTD/3556_sp_BlitzIndex_missing_index_processing
#3556 sp_BlitzIndex missing index processing
2 parents a7359ec + 1976f54 commit 36f4e72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sp_BlitzIndex.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,6 +1879,7 @@ WITH
18791879
ON ty.user_type_id = co.user_type_id
18801880
WHERE id_inner.index_handle = id.index_handle
18811881
AND id_inner.object_id = id.object_id
1882+
AND id_inner.database_id = DB_ID(''' + QUOTENAME(@DatabaseName) + N''')
18821883
AND cn_inner.IndexColumnType = cn.IndexColumnType
18831884
FOR XML PATH('''')
18841885
),
@@ -1916,6 +1917,7 @@ WITH
19161917
) x (n)
19171918
CROSS APPLY n.nodes(''x'') node(v)
19181919
)AS cn
1920+
WHERE id.database_id = DB_ID(''' + QUOTENAME(@DatabaseName) + N''')
19191921
GROUP BY
19201922
id.index_handle,
19211923
id.object_id,

0 commit comments

Comments
 (0)