Filegroups and indexes

  • Hi guys

    I haven't done this in years and can't remember how to anymore. Can you be so kind as to let me know how I can separate indexes to another filegroup and also should it be to a different physical disk entirely. Correct me if I'm wrong but I remember it's only the non clustered indexes that require the move?

    Thanks

    -Akin

  • CREATE [UNIQUE] NONCLUSTERED INDEX IX_Name ON dbo.TblName (Col1, Col2) ON FileGroupName

     

    If you were to do this with the clustered index, the whole table would be moved to this filegroup (not sure about the non clustered indexes but the data is moved fore sure).

  • You can only move the non-clustered to another filegroup if yu don't want to move the table as well. Remember a clustered index is part of the base table definition and structure , sorting, so moving it to another filegroup will move all the data as well.

    As for setting up on a seperate physicall drive the answer is yes it will improve performance as long as it is a true seperate drive or drive array as well if an array it can be on the same controller as long as the controller offers seperate channels.

  • I thought as much,  thanks guys.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply