Example - Splitting a LIST Subpartition v13
The following example splits a list subpartition, redistributing the subpartition's contents between two new subpartitions. The sample table (sales)
was created with the command:
The sales
table has two partitions, named first_half_2012
, and second_half_2012
. Each partition has two range-defined subpartitions that distribute the partition's contents into subpartitions based on the value of the country
column.
The following command adds rows to each subpartition.
A SELECT
statement confirms that the rows are correctly distributed amongst the subpartitions.
The following command splits the p2_americas
subpartition into two new subpartitions, and redistributes the contents.
After invoking the command, the p2_americas
subpartition has been deleted; in its place, the server has created two new subpartitions (p2_us
and p2_canada)
.
Querying the sales
table demonstrates that the content of the p2_americas
subpartition has been redistributed.