Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

List Partitioning in SQL Server 2012 Expand / Collapse
Posted Tuesday, April 16, 2013 5:05 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, November 14, 2014 5:18 PM
Points: 248, Visits: 1,052

Hi I got a requirement to partition the table on year, the column datatype is int and the values are like 03,04,05,06,07,08,09,10,11,12,13,14 etc..

Does SQL Server only supprts RANGE partitioning?

Can someone help me in partitioning the table here?

Thanks a alot in advance
Post #1443052
Posted Wednesday, April 17, 2013 4:05 AM


Group: General Forum Members
Last Login: Monday, November 17, 2014 10:22 AM
Points: 11, Visits: 129
SQL Server supports (only) range partitioning.
Nevertheless, I wouldn't suggest doing it without understanding well the capabilities and overhead related to it.

I'd start with the following article:

Post #1443173
Posted Wednesday, April 17, 2013 5:47 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 4:13 AM
Points: 954, Visits: 2,633
Another good article is this one by Gail Shaw.

If you are considering doing this simply to try and increase the performance of queries you need to have a rethink, Partitioning is more for data management, although you can get a slight uplift in performance on certain queries.

If you do decide to go with partitioning consider using an approach that allows data to be 'moved' into less frequently used storage, using a sliding window approach, I think Paul White had a blog that detailed this gives a basic concept

One consideration is how frequently data is to be accessed how often will you be running queries for data that's over N years old. Example Partitions for Data 10 years and older, 5-9 years, 2-4 Years old, Previous Year, and Current Year.

you can then look at moving older data onto less efficient storage (depending on circumstances) with the fastest disks being reserved for the more recent data and thus most probably the most frequently accessed data.

The final consideration is the amount of code refactoring that is going to be required to align queries to the new structure, which is something that a lot of people forget.

SSC Guide to Posting and Best Practices
Post #1443203
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse