Consider the following table in SQL Server 2008:
LanguageCode varchar(10) Language nvarchar(50)
LanguageCode is involved in the relationship, so I cannot create a primary key index that includes both columns (LanguageCode, Language).
If I put the main cluster key in LanguageCode, of course, I cannot include Language in the index (coverage index). This means that I will need to create a second index for the language or the risk of duplicates in it (plus force the table scan to get its value).
In addition, MS documentation (as well as experts on this) indicate that the table ideally has a clustered index.
In this case, the nonclustered coverage index (LanguageCode, Language) not only guarantees the uniqueness of the language, but also avoids scanning the table. However, there would be no βidealβ clustered index.
Is this one of those cases where the absence of a clustered index is actually ideal?
Change based on feedback:
The only request I want to run is:
SELECT Language, LanguageCode FROM Languages where Language="EN"
IamIC source share