SQL/MP Installation and Management Guide

Adding, Altering, Removing, and Renaming
Database Objects
HP NonStop SQL/MP Installation and Management Guide523353-004
7-20
Splitting, Moving, and Merging Partitions
This example sets the maximum number of extents for a partition of an index located
on $VOL1.SALES:
>> ALTER INDEX $VOL1.SALES.XORDCUS
+> PARTONLY MAXEXTENTS 300;
--- SQL operation complete.
Splitting, Moving, and Merging Partitions
You can move rows within partitions of a base table or index. To do this, use the
PARTONLY MOVE option with the ALTER TABLE or ALTER INDEX statement. You
can perform these operations that split, move, or merge partitions:
Move a partition from one volume to another
Perform a one-way partition split
Perform a two-way partition split
Move partition boundaries—move rows from one partition into another existing
partition
Merge a partition into another existing partition
For many of these operations, you can specify the WITH SHARED ACCESS option to
retain full read and write access to data throughout most of the operation. (Some
operations require the WITH SHARED ACCESS option.)
For a description of the steps you should follow when performing these operations, see
Steps for Adding a Partition on page 7-8.
Moving a Partition to Another Volume
You can move a partition to another volume with or without using the WITH SHARED
ACCESS option. If a table or index is not partitioned, you can use the MOVE option
without the PARTONLY clause to move the entire table or index to the new volume.
You can perform this move to change the format of a partition.
After the partition is moved to the target volume, SQL automatically drops the original
partition (from the source volume).
This example moves a partition of the EMPLOYEE table to another volume while
keeping the partition available for updates and reads during most of the operation:
>> ALTER TABLE $VOL5.PERSNL.EMPLOYEE
+> PARTONLY MOVE TO $VOL10.PERSNL.EMPLOYEE
+> CATALOG $VOL1.PERSNL
+> EXTENT (1000,200)
+> WITH SHARED ACCESS;
--- SQL operation complete.