I have this table with over 20,000 unique rows in them (software names like 'Adobe Acrobat Reader xx.x'). I have the table scripted below. I want to query this table and get the DisplayNameID to query another table with 5 columns of ID numbers. Other queries may query the DisplayNameID field to get the DisplayName from it. I originally made a non-clustered primary key and a non-clustered index on DisplayName as can be seen. But I am not sure if that is the best way. I know there is disagreement, but I am looking for thoughts on this. Some of the tables on this database are hundreds of millions of rows, so I want to make this efficient. Here is the table script:CREATE TABLE [dbo].[ARP_DisplayNames] ([DisplayNameID] int IDENTITY(1, 1) NOT NULL,[DisplayName] varchar(255) NULL,CONSTRAINT [PK__ARP_Disp__AB444FF432767D0B]PRIMARY KEY NONCLUSTERED ([DisplayNameID] ASC)WITH ( PAD_INDEX = OFF,FILLFACTOR = 100,IGNORE_DUP_KEY = OFF,STATISTICS_NORECOMPUTE = OFF,ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON,DATA_COMPRESSION = NONE ) ON [PRIMARY])ON [PRIMARY]WITH (DATA_COMPRESSION = NONE);GOCREATE NONCLUSTERED INDEX [idx_ARP_DisplayNames_DisplayName]ON [dbo].[ARP_DisplayNames]([DisplayName])WITH(PAD_INDEX = OFF,FILLFACTOR = 100,IGNORE_DUP_KEY = OFF,STATISTICS_NORECOMPUTE = OFF,ONLINE = OFF,ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON,DATA_COMPRESSION = NONE)ON [PRIMARY];GO
With DisplayName being up to 255 characters (in practice 145), I was afraid it would be too long to make a good clustered index and the other column was just an identifying integer. So I am not sure which way to go.Duane