Hi,
I have an existing table with around 200 Million rows and couple of partitions.
I would like to split the partitions
e.g. the Latest partition hold the data where date >= '2012-01-01' and I want to create more partitions which holds the data for each quarter of 2012 and 2013... so roughly the highest partition will be split into 7 partitions i.e. 6 partitions to hold data for each quarter up to 06/2013 and 7 will be empty partition.
I tried the following but it grows the log file to 40 GB and ran for hours for just 1 split .. and I have to do 7 splits.
ALTER PARTITION SCHEME fn_schemename NEXT USED [Primary];ALTER PARTITION FUNCTION fn_schemename() SPLIT RANGE(N'2012-03-31T00:00:00.000');
Is there any other way to avoid the log growth.
One I think of is:
- Create a new table Table_B.
- Create the required partitions using the existing partition scheme and functions.
- Copy the data from Table_A to Table_B
- Drop the Table_A.
- Rename the Table_B to Table_A
Have I missed any step? Is there any other way to avid log file increase and reduce the split time.
Regards,
Zee Ash