Marking partitions as split targets
- Last Updated: March 30, 2020
- 3 minute read
- OpenEdge
- Version 12.2
- Documentation
The following ALTER TABLE split
partition syntax prepares an existing partition to be split into
one or more partitions.
Syntax
|
Parameters
- partition name
-
Refers to regular, non-composite
RANGEpartition name to be split. It reports an error if aLISTpartition name is specified. - PRO_INITIAL
-
Refers to the composite initial partition of the migrated table.
- range_partition_split
-
Uses the following syntax:
TARGET{PARTITION|PARTITIONS [partition name ] [ RO_RW_ATTRIBUTE ]area spec[, ...]- column_values
-
Uses the following syntax:
column_value [ , column_value, ...]- column_value
-
Uses a constant as its value. Each column_value corresponds to a column name of a partition or a subpartition, in the same order in which the column names are defined.
- RO_RW_ATTRIBUTE
-
Uses the following syntax and marks the partition as a read-only partition or a read-write partition:
READ_ONLY | READ_WRITEIf
RO_RW_Attributeis not specified, then by default, the partition is marked as a read-write partition.
- list_partition_split
-
Uses the following syntax:
TARGET {PARTITION | PARTITIONS } partition_name [ RO RW ATTRIBUTE ][, ...]- RO_RW_ATTRIBUTE
-
Uses the following syntax and marks the partition as a read-only partition or a read-write partition:
READ_ONLY | READ_WRITEIf
RO_RW_Attributeis not specified, then by default, the partition is marked as a read-write partition.
LIST partition is not supported.
Only a RANGE partition can be split into one or
more partitions. After splitting composite RANGE partitions
into several partitions, the remaining RANGE partitions
can be marked as split targets by executing the following syntax: |
Notes
The following
semantics apply when using ALTER TABLE split initial
partition (PRO_INITIAL) syntax:
- The table specified in the syntax must be a partitioned table
- While executing this command to split an initial composite partition (
PRO_INITIAL), the table specified must be a migrated table. - Split
PRO_INITIALmarks all partitions referring to initial composite partition as split targets. - The partition specified in the syntax cannot be accessed after
execution, until the data is moved using the
PROUTILutility. However, it can be accessed by queries through the global index scan operation. - The execution of this syntax creates the necessary target storage objects and their respective index partitions.
- In case of
RANGEpartitions, only one partition definition refers to the composite initial partition per a set of same leadingLISTpartition keys. - All partition definitions referring to the composite initial partition are marked as split targets when the initial partition is split without new partition definitions (when neither range_partition_split nor list_partition_split is specified).
- The following semantics apply using
ALTER TABLEsplit partition syntax where the initial partition is split with new partition definitions, with range_partition_split specified:- All the new partitions added are marked as split targets
- The command can be used only with
RANGEpartitions - The new partition definitions must be within the boundaries of a composite partition
- If the split source specified is a non-composite
RANGEpartition, then the source partition name must be specified using thePARTITIONoption of split utility.
- The following semantics apply using
ALTER TABLEsplit partition syntax where the initial partition is split with specified target partitions, with list_partition_split specified:- All the partitions specified in the clause are marked as split targets.
- If the partitions specified in the clause are already marked as split targets, the SQL engine returns an error.
- Data in the specified partitions, once marked as split targets, is not accessible. It can be accessed from all other partitions that are not marked as split targets.
PARTITIONandPARTITIONSclauses can be used interchangeably.- Execution of the above syntax results in an error if the partition that is marked as the split target is accessed unless the data is moved using the split utility.
- Execution of the above syntax creates necessary storage objects and the respective index partitions for target partitions.
Examples
Marking partitions as read-only and read-write partitions while splitting non-composite RANGE partitions
|
Data movement from a read-only source partition to a read-write target partition is not
allowed. In the above example, the source partition NoHoldDKP15500 is a
read-only partition, and since some of the split targets are marked as read-write
partitions, the PROUTIL utility returns an error during the data movement.
Marking partitions as read-only and read-write partitions while splitting composite partitions
|