Partitioned Tables   «Prev 

Merging Oracle Partitions

Use the
statement to merge the contents of two partitions into one partition. The two original partitions are dropped, as are any corresponding local indexes. You cannot use this statement for a hash-partitioned table or for hash subpartitions of a composite *-hash partitioned table.
You cannot merge partitions for a reference-partitioned table. Instead, a merge operation on a parent table will cascade to all descendant tables. However, you can use the DEPENDENT TABLES clause to set specific properties for dependent tables when you issue the merge operation on the master table to merge partitions or subpartitions

Merging Partitions in Oracle

1) We will start with the same partitioned table.

2) The first step is to dump the data from the partitions that will be merged.

3) The next step is to drop the partitions that will be merged. This action will also drop the partitions of the local index.

4) The next step is to create a new partition. This action will also create the corresponding index partition for the local index.

5) Once the partition is created, you reload the dumped data into the table, which will also create the index entries.