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
Author
Message
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: Today @ 2:27 PM
Points: 230, Visits: 954






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
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 4:24 AM
Points: 10, Visits: 111
Hi,
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:
http://msdn.microsoft.com/en-us/library/ms190787.aspx

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: Yesterday @ 7:37 AM
Points: 860, Visits: 2,323
Another good article is this one https://www.simple-talk.com/sql/database-administration/gail-shaws-sql-server-howlers/ 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 http://weblogs.sqlteam.com/dang/archive/2008/08/30/Sliding-Window-Table-Partitioning.aspx

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