Moving Tables and Indexes to Filegroups En Masse

  • Comments posted to this topic are about the item Moving Tables and Indexes to Filegroups En Masse

  • This was very nice. A point to keep in mind though is the "dreaded" TEXT columns, these "animals" are hard to handle at least with the current scripting capabilities. and the scripts shown do not address this issue.

    Keep it up!

    * Noel

  • Very good article... no doubt your co-worker owes you some extra beer money 🙂

    Not picking on your scripts, rather this is something I've been wondering. What is the advantage of using the "MOVE TO" option on the ALTER TABLE DROP CONSTRAINT command when moving a clustered index to a new filegroup? To me creating the heap in the new file group with the MOVE TO option sounds like extra work that is not needed... especially since creating the clustered index on the new file group will move and sort the data.

    I appreciate any insight on this.



  • I wasn't sure about the benefits of MOVE TO until I did a drop constraint and then inspected the table.

    The data had shifted onto the desired filegroup so I would hazard a guess that the subsequent creation of the clustered index is dedicated to creating the key and not shifting data at the same time.

    Before anyone mentions it, it has occurred to me that rather than shift data onto filegroups I would have been better off shifting it onto partitions on filegroups. That said it was a quick down and dirty process and it would work on legacy SQL2000 database if required.

  • great article, i wish you printed it last month when i had to move around 100 GB from one filegroup to another.

  • This was a very informative read. It seems like this approach could be used to reconfigure a poorly planned partitioning strategy. Has anyone run into this need before?



Viewing 6 posts - 1 through 5 (of 5 total)

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