We help IT Professionals succeed at work.

partitioning database after decade growth

222 Views
Last Modified: 2017-03-22
pl see chart.{it includes data+index together} (SQL 2008R2)

after 10 years, db nearing 600GB.. what are best standards to break this for performance (perhaps by years of data, since all records have timestamp)

and reports are often done on 8 years of data.
600.png
Comment
Watch Question

Vitor MontalvãoIT Engineer
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
You gave only the database size. Partitioning is only for tables so you should start to filter only for large tables. For example, how many tables do you have that are more than 20GB size?
Instead of partitioning you can also move the old data to an archived database. This will be good if you know that older data won't be needed anymore but you still have it archived just in case of future need.
ste5anSenior Developer
CERTIFIED EXPERT

Commented:
Hard to tell as already Vitor said..

But partitioning alone is normally not the solution. Also distribute your data over multiple file groups. This allows you to deactivate old data without much hassle (it's then a simple meta operation instead of a delete). The only thing you need to consider is a rolling window.

8 years of data
A fixed time frame or rolling window? In the later case you need to consider one partition per year and a rolling window approach to add new years.

Author

Commented:
1.
>>how many tables do you have that are more than 20GB size?
five)
171.449218 (in GB)
85.838867
48.428710
34.099609
32.537109

2)
archived database.

basically make new databases right?
database_2003
database_2004 etc? (and delete 2003/2004 data)

3)
distribute your data over multiple file groups. (meta)
The database will be still big/same, right? backups/restore should take same time? will reports be smart to only hit the needed filegroups and hence less IO?

4)
rolling window
yes.
ste5anSenior Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Vitor MontalvãoIT Engineer
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
1.five)
All those 5 tables has at least a date or datetime field?

basically make new databases right?
 database_2003
 database_2004 etc? (and delete 2003/2004 data)
I wanted to suggest only a single database for archiving. You just need to be sure about which old data to be move into archive (data that you're almost sure it won't be accessed anymore).

Author

Commented:
>>All those 5 tables has at least a date or datetime field?
yes; all tables are date-based

>>I wanted to suggest only a single database for archiving.
thanks. Is this in addition to possible to partitioning (partition function as recommended in 42059344)or an alternative solution?

thanks for partial backups idea.

with the 5 tablesize i shared, would you recommend start only with the one 171GB or all 5?
IT Engineer
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
thank you,