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?
- 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?