How to do partition on a non clustered index column?
i have table orders .where there million rows in .i need add pationed index on order store data in 1 of 2 files based on new islocked field.but when checked table there non clustered index on islocked column.islocked field consists of 1 , o's.can 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 there 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 giys please me how partioning new table partioning .
you need learn , understand quite bit before can independently choose how best proceed use case. you're going have invest reasonable amount of time on endeavour worth it. partitioning interesting subject.
there wealth of information available here including video tutorials can watch , learn from. after have studied material, post forums specific questions might have.
have fun!
john sansom | sql server mcm
blog | twitter | linkedin | sql consulting
SQL Server > Getting started with SQL Server
Comments
Post a Comment