SQL Server Performance

About index(es)

Discussion in 'Performance Tuning for DBAs' started by Jelly0228, Mar 24, 2003.

  1. Jelly0228 New Member

    Hi,
    I have a table,and there's one index in it.and the table's filegroup is [PRIMARY].
    and I created other filegroup that named "subfile".
    Now I want to move the index to the filegroup of subfile with T-SQL.
    How to write the code?

    Help please..
    Thanks~

    Jelly is here.
  2. Chappy New Member

    Assuming you have an existing filegroup defined...

    CREATE INDEX MyIndex ON MyTable (MyColumn1, MyColumn2) WITH DROP EXISTING ON [MyFileGroup]

  3. Jelly0228 New Member

    Thanks chappy so much!

    Jelly is here.

Share This Page