Skip to main content
1 of 5
Gulrez Khan
  • 373
  • 1
  • 7
  • 20

Performance issue with composite primary key or not?

I configure identity column with composite primary key on Transactional Replication scenario to maintain unique row value. CREATE TABLE [dbo].[AD_CLIENT_DETAIL_MST]( [CLIENT_ID] [bigint] IDENTITY(1,1) NOT NULL, [SERVER_ID] char NOT NULL CONSTRAINT [DF_AD_CLIENT_DETAIL_MST_SERVER_ID] DEFAULT ('A'), [C_NAME] varchar NOT NULL, [CLIENT_TITLE] varchar NULL, [C_FIRST_NAME] varchar NOT NULL, [C_MIDDLE_NAME] varchar NULL, [C_LAST_NAME] varchar NULL, [C_DOB] [date] NULL, [RESELLER_ID] [bigint] NOT NULL, [RESELLER_NAME] varchar NULL, [CITY] varchar NULL, [STATE] varchar NULL, [COUNTRY] varchar NULL, [COMPANY_NAME] varchar NULL, [COMPANY_LOGO_PATH] nvarchar NULL, [COM_ADD1] varchar NULL, [COM_ADD2] varchar NULL, [BANK_NAME] varchar NULL, [BANK_ACCOUNT_NO] varchar NULL, [PAN_NO] varchar NULL, [TIN_NO] varchar NULL, [BANNER] varchar NULL, [YOCC_NO] varchar NOT NULL, [PRIMARY_NO] varchar NOT NULL, [SECONDARY_NO] varchar NULL, [ALLOWED_CHANNEL] [int] NOT NULL, [ACTIVE_OPERATOR] [int] NOT NULL, [CALL_ROUTING_TYPE] [bigint] NOT NULL, [CALL_ROUTING_PATTERN] [bigint] NOT NULL CONSTRAINT [DF_AD_CLIENT_DETAIL_MST_CALL_ROUTING_PATTERN] DEFAULT ((0)), [LIST_STATUS] [bigint] NOT NULL, [SMS_PROVIDER_ID] [bigint] NOT NULL, [EMAIL_PROVIDER_ID] [bigint] NULL, [IS_BLOCK] [bit] NOT NULL, [REG_DATE] [datetime] NOT NULL, [TOTAL_USER] [int] NULL, [TOTAL_ADMIN] [int] NULL, [EXP_DATE] [datetime] NULL, [CHANNEL_COUNTER] [int] NULL, CONSTRAINT [PK_AD_CLIENT_DETAIL_MST] PRIMARY KEY CLUSTERED ( [CLIENT_ID] ASC, [SERVER_ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

Gulrez Khan
  • 373
  • 1
  • 7
  • 20