Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Why should we have multiple FileGroups instead of one?


Why should we have multiple FileGroups instead of one?

Author
Message
Shadab Shah
Shadab Shah
Old Hand
Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)

Group: General Forum Members
Points: 307 Visits: 798
I just happen to visit a good forum site on SQL Server. Over there, there was one article which says that we should have more than one FileGroup because it is good pratice. But over there the author failed to mention why should we not have single FileGroup ? Could any body help me understand this?
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47427 Visits: 44405
Another article making blanket statements without explaination .... :-(

Multiple filegroups - maybe. Not always. Two reasons.
Split for performance - requires that the DB is IO bound to have any effect and that the filegroups are split onto multiple separate IO paths. Multiple files on the same drive will have no effect. Requires some careful analysis of which tables and indexes get the heaviest IO load.

Split for recoverability - for when the DB is large enough that it can't be restored in the time allowed by the RTO. Split the DB so that the critical part can be restored fast and the rest later. Requires Enterprise edition and careful analysis of what tables are needs by what parts of the app, what's critical and what's not.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


terry999
terry999
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 677
Say you have a table of sales you could partition on sales date, so have one file per year.

Performance would be better for queries in that time period
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47427 Visits: 44405
terry999 (3/25/2013)
Say you have a table of sales you could partition on sales date, so have one file per year.

Performance would be better for queries in that time period


Partitioning is not about performance, it's about manageability, data loads, large deletes. It may help performance, but it's by no means guaranteed.
https://www.simple-talk.com/sql/database-administration/gail-shaws-sql-server-howlers/


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


sqlmunkee
sqlmunkee
SSC-Addicted
SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)SSC-Addicted (461 reputation)

Group: General Forum Members
Points: 461 Visits: 286
Certainly, partitioning is one case for multiple file groups (although I have seen sliding windows partitions on the PRIMARY filegroup). If you partition-align your indexes as well, that's a win right there :-)

I also like to split Sharepoint content databases into multiple file groups, one for all the internal Sharepoint stuff, and another for user-generated objects (AllDocs, AllLists, etc). This helps reduce resource contention at the page level in the data file. IO is still a bit of an issue, since all filegroups and files are on the same mountpoint, but our current setup is performant enough with the content databases split.:-)

sqlmunkee
Bringing joy and happiness via SQL Server since 1998
terry999
terry999
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 677
Thanks nice article

I cannot use it I have workgroup edition.
dan-572483
dan-572483
SSChasing Mays
SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)SSChasing Mays (649 reputation)

Group: General Forum Members
Points: 649 Visits: 1958
Interesting.. when reading that you can restore a single filegroup, I wondered about the wizdom of doing a filegroup restore rather than the entire database because of potential referencial issues. (This book was lacking because it often described what you can do with no examples of scenarios when or why you would want to do them).

But if the data is partitioned so that you don't have two-way dependency between tables in different filegroups, then this wouldn't be an issue. For example, if you had 2001-2005 sales data in one filegroup and 2006-2010 sales data on another, you could restore one without needing to restore the other. Or if you did need to restore both and they were on different I/O paths, you could restore them simultaniously in less time than it would take if they were in one larger filegroup. Am I understanding this right?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search