Caution When Dropping Unused Indexes on an Azure SQL Database
Index Maintenance is an important aspect of database health. Above and beyond regular index rebuilds and reorganizations it is important to understand the usage of the indexes on your database. Cleaning up unused indexes can save a lot of overhead on Insert/Update/Delete operations. To achieve that goal, I typically run a script like the one shown below and check out whether or not an index has had any seeks or scans against it as a starting point in my cleanup regiment. SELECT d.name, OBJECT_NAME(i.[object_id]) AS [ObjectName], i.[name] AS [IndexName], s.user_seeks, s.user_scans FROM sys.indexes AS i … Continue Reading