create .ndf files and indexes in different filegroups??

  • Hi

    We have server 2005 in my application..its our requirement every time we inserting data into DB in different tables and then we add constaints, indexes on these tables.

    when huge data comes what we are doing, we stored all our indexes,constraints,PK-Fk into run time temp tables and then drop these objects and insert data for better performance and again we add these objects to respective tables.But it is taking too much time to do all these things..now what we thinking can we store table data into one file group and indexes into another..if yes then please guide me how to create indexes in another filegroup....


    Regards,

    Papillon

  • Wen you are creating index use ON <Filegroup> option otherwise index will be created on default filegroup....

    CREATE INDEX IX_INDEX ON TABLENAME(COLUMN_NAME) ON FILEGROUP_NAME

     

    MohammedU
    Microsoft SQL Server MVP

  • Microsoft suggests to have the data and indexex in different file groups to enhance performance. but if you just need to insert data of huge time only once in a months or 15 days i hope you can achiveve this by disabling the constraint and insertig the data again enabling the constraint. but the first option is the best as you will really see a potential performance boost up.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

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

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