Add is_unique in sys2.indexes_usage_stats


I think it's very useful to know if a index is unique querying that function when I'm going to disable the unuseful indexes.
The sys2.indexes_usage_stats.sql function shows a column named is_unique_constraint that is taken from sys.indexes table.
If it is equal to 1 it means that the "Index is part of a UNIQUE constraint", but if it's a UNIQUE INDEX the sys.indexes column that shows us this information is another one: is_unique.
Even if they basically are the same thing, those information are stored in different places in the same system tables.
Closed Apr 6, 2012 at 4:24 PM by manowar


manowar wrote Mar 4, 2012 at 7:28 PM

Done :)

wrote Mar 4, 2012 at 7:30 PM

FrancescoQuaratin wrote Mar 6, 2012 at 12:24 PM

Well done!

wrote Apr 6, 2012 at 4:24 PM

wrote Feb 13, 2013 at 3:06 AM

wrote May 16, 2013 at 3:04 AM