How to move a table from one filegroup to another?

  • How do i move a table from one filegroup to another?

     

    ------------
    Prakash Sawant

    http://psawant.blogspot.com

  • Rebuild the clustered index on the new filegroup.

  • Thanks for the reply Steve.

    I got one more way through EM

    Right click table in EM -> design table -> table property -> table filegroup.

     

    ------------
    Prakash Sawant

    http://psawant.blogspot.com

  • - A clustered index _contains_ the datapages (leaflevel)  !

    - if you create a table on a specific filegroup, if there is no clustering index, the data will reside on the filegroup of the table.

    - if you create a clustering index on a different filegroup than the table, your data will reside in the filegroup of the clustering index. If you then drop the clustering index, the data will move back again to the filegroup of the table.

    - in most cases (oltp) it's best to have a clustering index

     

     

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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