Skip to content

Commit c725285

Browse files
committed
Add comments
1 parent c34de07 commit c725285

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Scripts/Find Overlapping Indexes.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@
4949
Even though their defined structure appears to be covered, their physical structure is not.
5050
*/
5151

52-
/* Considerations:
52+
/* Considerations / TODO:
5353
- Improve ability to compare the entire index definition. Currently, only keys and includes are compared.
5454
However, things like...padding, fillfactor and other settings are ignored.
55+
- Add list of column differences for mergeable indexes. For now it's just a list of column ID's which isnt very helpful.
56+
- Should clustered vs nonclustered and/or unique vs non-unique duplicate matches indexes be classified as "duplicate"
57+
or overlapping? (currently classified as overlapping)
5558
*/
5659
------------------------------------------------------------------------------
5760

@@ -214,7 +217,7 @@
214217
INTO #idx_col_cnt
215218
FROM #target_indexes i
216219
JOIN #idx_cols ic ON ic.[object_id] = i.[object_id] AND ic.index_id = i.index_id
217-
WHERE ic.rn = 1
220+
WHERE ic.rn = 1
218221
GROUP BY i.[object_id], i.index_id, i.IndexType;
219222

220223
IF OBJECT_ID('tempdb..#obj_col_cnt','U') IS NOT NULL DROP TABLE #obj_col_cnt; --SELECT * FROM #obj_col_cnt

0 commit comments

Comments
 (0)