Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 file groups / partitioning questions

Author  Topic 

albertkohl
Aged Yak Warrior

740 Posts

Posted - 2012-06-07 : 16:52:27

question. i have a table that is around 800 million records. i was using partitioning w/ an incrementing identity column to split it across 8 file groups (8 different disks) but far-passed the qty for the last disk, so now all new data is on the last disk. is there any way to design the table/db in a manner so that once all of the disks in the partition are full, it starts back at the beginning of the chain? i basically would like it to evenly distribute the data across all 8 disks and auto grow. probably a really NUB question, and a simple answer, but not sure what to do here.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-07 : 16:55:16
This is not my area of expertise, but shouldn't you have used one filegroup spread across the disks? That's how we do it here. Just not sure how that fits into partitioning.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

albertkohl
Aged Yak Warrior

740 Posts

Posted - 2012-06-07 : 16:58:41
so you would just have one filegroup, and have it sitting on a raid5 or something?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-07 : 17:01:39
I'd have one filegroup which would have 8 different files, one file on each drive/mount point. SQL Server uses a proportional fill algorithm to spread the data across them. They don't need to evenly sized like they do for tempdb, but I do keep them at the same size. SQL just tries to the keep the full percentage the same across them, regardless of size.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

albertkohl
Aged Yak Warrior

740 Posts

Posted - 2012-06-07 : 17:05:04
so sql basically will auto-balance it if you have nothing explicitly setup? (like i would w/ partitioning) is that correct?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-07 : 17:05:57
Yes it does. You actually don't even need a filegroup to do it, but a filegroup is recommended.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

albertkohl
Aged Yak Warrior

740 Posts

Posted - 2012-06-07 : 17:28:07
perfect, i'll try that. thanks!
Go to Top of Page

albertkohl
Aged Yak Warrior

740 Posts

Posted - 2012-06-07 : 17:46:09
can you give me a sample db create script for one file group, two files with two separate mount points? i'm playing with the wizard and i'm a little lost, the script would probably spell it out for me.
Go to Top of Page

albertkohl
Aged Yak Warrior

740 Posts

Posted - 2012-06-07 : 18:01:52
O_o n/m i see... i flipped files/groups :)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-07 : 18:18:12
Sorry I don't have a script readily available.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -