Example: Splitting a RANGE subpartition v15
This example splits a range subpartition, redistributing the subpartition's contents between two new subpartitions.
The sample table sales
was created with the command:
The sales
table has the partitions europe
, asia
, and americas
. Each partition has two range-defined subpartitions that sort the partitions contents into subpartitions by the value of the date
column:
This command adds rows to each subpartition:
A SELECT
statement confirms that the rows are distributed among the subpartitions:
This command splits the americas_2012
subpartition into two new subpartitions and redistributes the contents:
After the command is invoked, the americas_2012
subpartition is deleted. In its place, the server creates the subpartitions americas_p1_2012
and americas_p2_2012
:
Querying the sales
table shows that the subpartition's contents are redistributed: