sql - partioned index on a non partioned table -
how create partioned index on table not partioned although there partion function , scheme available. excersise read somewhere, not real problem
create partition function func(datetime) range right values ('20040601', '20050601') go create partition scheme scheme1 partition func ('primary') go create table student ( studentid int not null primary key nonclustered, firstname varchar(30) not null, date datetime not null )
i thinking of
create clustered index ix_studentid_date on student(studentid, date)
but table not partioned, how create index, without partitioning table?
when partition "table" partitioning clustered index. partitioning non clustered index same partitioning "table"
create nonclustered index ix_studentid_date on student(studentid, date) on scheme1(date)
you have make sure partition field part of index.
Comments
Post a Comment