Internals viewer reports clustered index as 'Heap' in the key grid. For example, in the AdventureWorks2008 database, table dbo.DatabaseLog, index PK_DatabaseLog_DatabaseLogID is non-clustered. In the key grid appears labeled as 'Clustered'. Conversely, in
table HumanResources.Department, index PK_Department_DepartmentID is clustered and is labeled as 'Heap'.
Thanks (wonderful tool! :-)).
Xosé Antonio Rubal
Enum used is the same for pages and indexes. Int values are wrong for indexes.
public enum IndexTypes
Heap = 1,
Clustered = 2,
NonClustered = 4,
Leaf = 8,
Node = 16,
TableClustered = 32,
NonClusteredLeaf = NonClustered | Leaf
I changed in source code the mapping in AllocationUnitLayer.cs
int index_type = Convert.ToInt32(row["index_type"]);
if (index_type == 0)
layer.IndexType = IndexTypes.Heap;
else if (index_type == 1)
layer.IndexType = IndexTypes.Clustered;
else if (index_type == 2)
layer.IndexType = IndexTypes.NonClustered;
//the previous code I've found here
layer.IndexType = (IndexTypes)index_type;