March 25, 2013 at 6:50 am
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?
March 25, 2013 at 7:03 am
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
March 25, 2013 at 7:10 am
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
March 25, 2013 at 7:23 am
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
March 25, 2013 at 7:27 am
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.:-)
[font="Courier New"]sqlmunkee[/font]
[font="Courier New"]Bringing joy and happiness via SQL Server since 1998[/font]
March 25, 2013 at 7:48 am
Thanks nice article
I cannot use it I have workgroup edition.
March 25, 2013 at 1:40 pm
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?
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply