Tuesday, 5 December 2006

Recommendations for SQL Server File Group Creation

· The primary file group must be totally separate and should be left to have only system objects and no user defined object must be created on this primary file group.
· The primary file group should not be set as default file group.
· Separating the system objects from other user objects will increase performance and enhance ability to access tables in the case of serious data failures
· If there are more than one physical drive available in the system then try to create as many physical files per file group and put one file per disk. This will improve performance because whenever a table is accessed sequentially in SQL Server, a separate thread is created for each file to read the table’s data in parallel.
· A separate file group can be created for indexes and the number of physical files can be created as mentioned in the above point.
· Creating a table in one file group and place the text, next and image columns in a different file group on different physical disks.
· The log file must be placed on different physical disk then the data files, because the logging is more write intensive, it is important to have the log on the disk that have good I/O performance. The log file should be RAID 0 or 1 which supports write intensive operation.

6 comments:

  1. Um no, you never put a database on a RAID without fault tolerance. Hard drives always crash. That is a good way to ruin your database.

    Also, why would you seperate out the index and tables? Where the clustered index is... so is your data. Your non-clustered indexes are not that large - not a whole lot of I/O gained by doing this.

    ReplyDelete
  2. Creating indexes in a different file group provides multiple paths (including threads) to access the records. That includes clustered indexes.

    Good info on the article. It would be interesting to create test cases to prove your points!

    Thanks.

    ReplyDelete
  3. on VLDB you should indeed have a different file group for indexes and data. However, one thing I do is put the cluster index on the same drive as the data and non clustered indexes in the index file group. The reason this is done is that your data is organized and stored according to the cluster index (have you ever noticed that the clustered index takes up little to no space).

    ReplyDelete
  4. Friend said me about one nice tool-recover mdf,which recover sql files.And after some time I used it and tool recovered all my data very quickly.Besides that it executed this operation for free and showed repair .mdf files of Microsoft SQL Server 2005.

    ReplyDelete