|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Moving indexes from a filegroup to anotherI have a 65 Gb database stored on a single filegroup and I would like to move non-clustered indexes to another filegroup. I'm thinking of the following process: _ Backup initial database _ Create new empty database with two filegroups (one for data, one for indexes) (the database is created by a software that defines all the objects on a single filegroup) _ Moving indexes (definition) from a filegroup to another while the database is empty. _ Restore data and indexes from the previous backup so that data go the data filegroup and indexes go to the indexes filegroup. Another solution would be to drop the indexes and recreate them on the new filegroup but moving 65 Gb will probably take a very long time. Any ideas ? Thanks ! > I have a 65 Gb database stored on a single filegroup and I would like The only index you can move is the clustered index (which effectively takes > to move non-clustered indexes to another filegroup. the table and all the non-clustered indexes with it). You can do this by dropping the clustered index and re-creating it on the new filegroup, by using ON <filegroup>. If you want to separate the data (Heaps & Clustered indexes) from the
non-clustered indexes you will need to drop the non-clustered indexes and recreate them on the new filegroup. YOu won't move all 65GB since the table itself should be the majority of the data. There is no need to restore anything. -- Show quoteHide quoteAndrew J. Kelly SQL MVP <florent.jean***@gmail.com> wrote in message news:1139511741.514031.76310@o13g2000cwo.googlegroups.com... > Hi, > > I have a 65 Gb database stored on a single filegroup and I would like > to move non-clustered indexes to another filegroup. > > I'm thinking of the following process: > > _ Backup initial database > _ Create new empty database with two filegroups (one for data, one > for indexes) (the database is created by a software that defines all > the objects on a single filegroup) > > _ Moving indexes (definition) from a filegroup to another while the > database is empty. > _ Restore data and indexes from the previous backup so that data go > the data filegroup and indexes go to the indexes filegroup. > > Another solution would be to drop the indexes and recreate them on the > new filegroup but moving 65 Gb will probably take a very long time. > > Any ideas ? > > Thanks ! >
Other interesting topics
Using FKs to non PK unique-indexes
1 to many relationship between columns trouble using a temp table in another SELECT SELECT info from table on a different server Help importing legacy FoxPro db into SQL 2000 Difference Function Executing Stored Procedure within Trigger Reducing 5 values to 1 value data convertion with dynamic sql SELECT help |
|||||||||||||||||||||||