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

Partitioning multiple tables of varying ranges Expand / Collapse
Author
Message
Posted Friday, January 18, 2013 9:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, December 19, 2014 9:53 AM
Points: 165, Visits: 511
Everyone-

I am fixing a partitioning gone wrong implementation of a small number of large tables in a data warehouse. The overall setup is the same as any of the multitude of examples provided: partitioning is right ranged based on a date column specific to each table. The actual task of undoing and redoing the partitioning is relatively easy, but I have a question that I have not seen covered in any partitioning articles, blogs, forums, etc.

The current setup partitions every table by year ranging from 2004 to present, however the range covered in the date column for each of these tables varies:

Name Lower Bound Upper Bound
Table1 2009-01-01 00:00:00.000 2013-01-17 22:03:07.000
Table2 2008-02-10 20:00:00.000 2013-01-18 00:00:00.000
Table3 2008-05-01 00:02:37.000 2013-01-17 23:56:52.000
Table4 2008-05-01 00:19:16.000 2013-01-17 23:56:52.000
Table5 2004-03-04 10:19:33.000 2013-01-18 04:47:14.970
Table6 2005-10-05 06:38:54.380 2013-01-17 20:21:08.000
Table7 2005-04-21 09:51:45.000 2013-01-17 23:51:32.090
Table8 2009-08-06 17:30:00.000 2013-01-18 00:00:00.000
Table9 2006-05-15 14:29:05.423 2013-01-18 04:06:19.270
Table10 2004-02-19 15:17:08.000 2013-01-17 22:01:40.000
Table11 2006-08-07 11:36:00.000 2013-01-17 21:59:58.000

So the question I have: after I undo the work already done should I re-partition:

- every table consistently by year from 2004 to present thus creating multiple partitions with 0 records other than the left most partition as documented for use with the sliding window technique?

OR

- each table by year based upon each table's earliest date (i.e. Table1 starts at 2009-01-01, Table2 starts at 2008-01-01, etc) thus leaving only the left most partition with 0 records?

I tend to think sticking with the first one will be easier to create, manage, and maintain, but is there any performance advantage to doing the latter?

DH
Post #1408978
Posted Friday, January 18, 2013 1:39 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, January 28, 2014 8:15 AM
Points: 3,065, Visits: 4,639
In my opinion option #1 would be more elegant.
No performance advantages in going with option #2.


_____________________________________
Pablo (Paul) Berzukov

Author of Understanding Database Administration available at Amazon and other bookstores.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Post #1409087
Posted Monday, January 21, 2013 1:03 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, December 19, 2014 9:53 AM
Points: 165, Visits: 511
Thanks Pablo for your input. I was pretty certain it would be best to partition consistently across all tables. Thanks!
Post #1409686
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse