1

Closed

Add is_unique in sys2.indexes_usage_stats

description

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 5:24 PM by manowar

comments

manowar wrote Mar 4, 2012 at 8:28 PM

Done :)

wrote Mar 4, 2012 at 8:30 PM

FrancescoQuaratin wrote Mar 6, 2012 at 1:24 PM

Well done!
Cheers.

wrote Apr 6, 2012 at 5:24 PM

wrote Feb 13, 2013 at 4:06 AM

wrote May 16, 2013 at 4:04 AM