General - Do you use a SQL Server Indexes Naming Standard?
3/01/2020 4:35 PM by
This standard outlines the procedure on naming Indexes at SSW for SQL Server. Use this standard when creating new Indexes or if you find an older Index that doesn't follow that standard.
Note: There is not a lot of use naming Indexes - we only do it when we are printing out documentation or using the 'Index Tuning Wizard' - then it becomes really handy.
Do you agree with them all? Are we missing some? Let us know what you think.
Index names are to have this syntax:
[pkc_] [TableName] by [FieldName]
[ 1 ] [ 2 ] [ 3 ]
 All indexes must have a corresponding prefix.
|pkc_||Primary Key, Clustered|
|pknc_||Primary Key, Non Clustered|
|ncu_||Non Clustered, Unique|
|nc_||Non Clustered (Most Common)|
Make unique index name if possible. Ie. ProductName
 The name of the table that the Index refers to.
 The name of the column(s) that the Index refers to.
Index 'BillingID'Figure: Bad Example
Primary Key 'aaaaaClient_PK'
'nc_ClientDiary_BillingID'Figure: Good Example
Do you feel this rule needs an update?