Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Moving Tables and Indexes to Filegroups En Masse


Moving Tables and Indexes to Filegroups En Masse

Author
Message
David.Poole
David.Poole
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4605 Visits: 3186
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
noeld
noeld
SSCertifiable
SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)SSCertifiable (7.1K reputation)

Group: General Forum Members
Points: 7050 Visits: 2048
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
DavidSimpson
DavidSimpson
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1032 Visits: 1074
Very good article... no doubt your co-worker owes you some extra beer money Smile

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



David.Poole
David.Poole
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4605 Visits: 3186
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
VadimK
VadimK
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 155
great article, i wish you printed it last month when i had to move around 100 GB from one filegroup to another.



scaldwell-944061
scaldwell-944061
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 660
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search