Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2008: Is there any benefit to multiple filegroups on the same physical drive?

This is most likely a ridiculous question, but I'm intrigued by the thought so I'll ask anyway. Is there any performance or benefit (outside of disaster recovery handling) of having a database on multiple filegroups stored on the same physical drive?

More specifically, if I create a secondary filegroup ONLY for full-text indexes on the same physical drive, is it beneficial? Could it be a bottleneck?

Log files in my situation are stored on a separate physical drive from data files.

like image 478
Brad Avatar asked Aug 05 '11 18:08

Brad


People also ask

What is the use of having multiple filegroups?

Utilizing the approach for using multiple FILEGROUPs, you have the possibility to split your data between multiple files within the same Filegroup, even when using table partitioning.

How do I create multiple filegroups in SQL Server?

Right click on the database and go to properties and filegroup. Add new filegroup by simply adding name. I encourage all my readers to keep mailing me send in your questions and doubts. I will certainly take them up at some point of time.

How many types of filegroups are there in SQL Server?

The SQL Server has four filegroups. Primary Filegroup: The primary filegroup is a default filegroup. When we create a new SQL database, the Primary filegroup is automatically created.

What is secondary filegroup SQL Server?

A secondary filegroup (also called a user-defined filegroup) contains secondary datafiles (ndf) and database objects. The default filegroup contains objects which were created without an assigned filegroup. The primary filegroup is the default filegroup unless another filegroup is specified.


2 Answers

It shouldn't provide any additional benefit, except that with separate file groups you could, potentially, split out your backups. As far as the I/O on the same drive, you won't gain much if anything by doing this, so if you're considering it strictly for an I/O performance reason, I would suggest holding off until you can budget separate spindles.

like image 194
Aaron Bertrand Avatar answered Oct 05 '22 07:10

Aaron Bertrand


Multiple files have the benefit of reducing allocation contention (PFS latch contention). Really really really fast IO subsystems (eg. SSD drives) can expose this problem and require mitigation by adding more files to the database. There are more details on this at How many files should a database have? or on Benchmarking: Multiple data files on SSDs.

Multiple filegroups imply multiple files, but at the same time a hot table will not benefit from multiple filegroups because the hot spot will be, again, in a single filegroup (unless, of course, the hot filegroup is itself split into multiple files). So I would say that filegroups are to be used solely for administration purposes (eg. piece meal restore).

like image 21
Remus Rusanu Avatar answered Oct 05 '22 07:10

Remus Rusanu