I have table ORDERS .Where there are Million rows in it .I need to add Pationed Index on Order to store data in one of two files based on the new IsLocked field.But when i checked table there is a Non clustered index on ISLocked Column.IsLocked field consists of 1 and O's.Can you guys suggest me best approach.
CREATE TABLE [Orders]( [OrderID] [int] IDENTITY(1,1) NOT NULL, [OrderNo] [varchar](50) NULL, [AccountNo] [varchar](20) NULL, [CompleteDate] date null, [LastUpdateDate]) date null, [AccountID] int NULL, [IsWarranty] [bit] NULL, [IsEmailAddressFound] [bit] NULL, [IsLocked] [bit] NOT NULL, [LinkOrderID] [int] NULL )
But already there is a
CREATE NONCLUSTERED INDEX [IX_IsLockedAccountID] ON [coe].[Orders] ( [IsLocked] ASC, [AccountID] ASC ) INCLUDE ( [OrderNo], [CompleteDate], [LastUpdateDate]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] GO Orders IX_IsLockedAccountID NONCLUSTERED 72057594556710912 1 1146462
Can you giys please help me how to do partioning as i am completely new to Table partioning .