Clustered Index and Heap

<< Click to Display Table of Contents >>

Navigation:  View Indexes > Examples Usage >

Clustered Index and Heap

The Index Clustered Index column shows.

 

 

1.Heap- no icon

2.Unique clustered index

3.Non unique clustered index

4.Clustered columnstore index

 

 

Sorting on the column

The sort order for the clustered index column is

1.Heap tables

2.Unique clustered indexes

3.Non Unique clustered indexes

4.Clustered columnstore indexes

 

 

 

Sort by the column Index Clustered Index to identify tables with no clustered index.

 

 

If you see tables with no clustered index (heap tables) this is generally a bad thing. To understand the impact of heap tables and non unique clustered indexes go to here

 

 

Level:        Table

Icon

Description

none

No clustered index on table

index CI

Unique clustered index

index CI_disabled

Unique clustered index disabled. This disables table access

index CI not unique

Non unique clustered index

index CI not uniquedisabled

Non unique clustered index disabled. This disables table access

table_CS

Clustered columnstore index

table_columnstore_disabled

Clustered columnstore index disabled. This disables table access

 

 

Examples:

 

Sort on column Index Clustered Index ascending

 

Here you can see heap indexes= no icon, and a green clustered icon= Unique clustered index

indexexample1

 

 

Sort on column Index Clustered Index descending to quickly find non unique clustered indexes and clustered columnstore indexes

In this example  you can see a clustered columnstore index, a NON unique clustered index, and a unique clustered index.

indexexampletable1

 

 

 

Level: Column

Icon

Description

none

No clustered index on table

index CIN

Unique clustered index.N is the key order eg. index CI3 is the 3rd column in the primary key

index CI_disabledN

Unique clustered index disabled. This disables table access.N is the key order eg. index CI_disabled3 is the 3rd column in the primary key

index CI not uniqueN

Non unique clustered index.N is the key order eg. index CI not unique3 is the 3rd column in the primary key

index CI not uniquedisabledN

Non unique clustered index disabled. This disables table access.N is the key order eg. index CI not uniquedisabled3 is the 3rd column in the primary key

table_CS

Clustered columnstore index (no ordering is given)

table_columnstore_disabled

Clustered columnstore index disabled (no ordering is given). This disables table access

 

 

in the screen shot below you can see at the column level are 2 columns in the clustered index on the table HumanResources.EmployeeAddress

Both columns are on a unique clustered index (as the icons is green)

 

EmployeeID has an ordinal position of 1

AddressID has an ordinal position of 2

 

clip0024