Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Moving Tables and Indexes to Filegroups En Masse Expand / Collapse
Author
Message
Posted Tuesday, January 20, 2009 10:41 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:09 AM
Points: 2,863, Visits: 1,703
Comments posted to this topic are about the item Moving Tables and Indexes to Filegroups En Masse

LinkedIn Profile
Newbie on www.simple-talk.com
Post #640408
Posted Wednesday, January 21, 2009 9:55 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Tuesday, April 01, 2014 8:03 PM
Points: 6,266, Visits: 2,027
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
Post #640908
Posted Wednesday, January 21, 2009 10:00 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 9:28 AM
Points: 902, Visits: 972
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.

Thanks
David



Post #640914
Posted Wednesday, January 21, 2009 10:49 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:09 AM
Points: 2,863, Visits: 1,703
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.


LinkedIn Profile
Newbie on www.simple-talk.com
Post #640959
Posted Wednesday, January 21, 2009 3:31 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, March 22, 2014 9:46 AM
Points: 28, Visits: 118
great article, i wish you printed it last month when i had to move around 100 GB from one filegroup to another.


Post #641209
Posted Thursday, January 22, 2009 6:13 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 1:48 PM
Points: 1, Visits: 555

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?

Thanks,

Scott
Post #641608
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse