Skip to content

Commit

Permalink
Merge pull request #297 from sm8680/patch-4
Browse files Browse the repository at this point in the history
Update view_IndexCreation.sql
  • Loading branch information
bluefooted authored Dec 3, 2024
2 parents 3f2f5a2 + 6987d62 commit af8d41c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Index-Creation/view_IndexCreation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ INNER JOIN sys.dm_db_missing_index_group_stats s ON s.group_handle = g.index_gro
WHERE i.database_id > 4

INSERT INTO #IndexRedundant
SELECT I.DBName, I.[Table], I.[Ix_Name], i.[ix_handle], I.[KeyCols], I.[IncludedCols], I2.[Ix_Name]
SELECT I.DBName, I.[Table], I.[Ix_Name], I.[ix_handle], I.[KeyCols], I.[IncludedCols], I2.[Ix_Name]
FROM #IndexCreation I
INNER JOIN #IndexCreation I2 ON I.[database_id] = I2.[database_id] AND I.[Table] = I2.[Table] AND I.[Ix_Name] <> I2.[Ix_Name]
AND (((I.KeyColsOrdered <> I2.KeyColsOrdered OR I.[IncludedColsOrdered] <> I2.[IncludedColsOrdered])
Expand Down

0 comments on commit af8d41c

Please sign in to comment.