Nonstop Database, HiRDB Version 9 System Operation Guide
The split facility splits into multiple RDAREAs the data stored in a specified range of a table that is partitioned by boundary values. The details of the split facility are explained below.
The following table shows maximum values for the split facility.
Table 13-7 Maximum values for the split facility (in the case of boundary value specification)
Item | Maximum value | What happens when the maximum value is exceeded |
---|---|---|
Number of RDAREAs that can be split | 1 | Causes an error in ALTER TABLE. |
Number of RDAREAs into which an RDAREA can be split in a single operation | 16 | |
Total number of RDAREAs following splitting | 1024 | |
Total number of specified boundary values following splitting (including other) | 3000 |
The RDAREA that satisfies a specified storage condition is selected for splitting, based on a partitioning boundary value that is specified in CHANGE RDAREA of the ALTER TABLE definition SQL. Because specification of a boundary value identifies the target RDAREA, there is no need to specify the RDAREA itself. The following table shows the ALTER TABLE specification and how to determine which RDAREA to split.
Table 13-8 ALTER TABLE specification and determination of RDAREA to be split (in the case of boundary value specification)
Specification | Condition | Can be specified? | Determination of RDAREA to be split |
---|---|---|---|
Boundary value | The specified boundary value is specified in the table definition | Y | RDAREA that stores the specified boundary value range becomes the target for splitting. |
The specified boundary value is not specified in the table definition | N | -- | |
'MAX' | -- | Y | RDAREA that stores partitioning key values that are greater than the maximum boundary value becomes the target for splitting. |
The RDAREAs to be used for storing data after splitting are determined on the basis of the post-splitting boundary values and RDAREAs specified in CHANGE RDAREA of ALTER TABLE. Note that the post-splitting boundary values that are specified must be in ascending order, and the maximum value of the specified boundary values must be greater than the pre-splitting boundary value. Additionally, all partitioned boundary values must be within the range of the pre-splitting storage conditions. The following table shows ALTER TABLE specification values and the method for determining which RDAREAs to use after splitting. Figure 13-21 shows the boundary value conditions before and after splitting.
Table 13-9 ALTER TABLE specification values and the method for determining which RDAREAs to use after splitting (in the case of boundary value specification)
Pre-splitting boundary values | Post-splitting boundary values specification | Condition | Can be specified? | Determination of post-splitting RDAREAS |
---|---|---|---|---|
Minimum boundary value (1. in the figure) | Boundary values | Post-splitting boundary value is smaller than the minimum boundary value (4. in the figure) | Y | Specified storage conditions and RDAREAs are used to select the post-splitting RDAREAs. |
Post-splitting boundary value is equal to or greater than the minimum boundary value (1., 2., 3., and 5. in the figure) | N | Causes an error in ALTER TABLE. | ||
Omitted | None | Y | RDAREA specified to store the maximum value range among the post-splitting storage conditions | |
Intermediate or maximum boundary value (2. in the figure) | Boundary values | Post-splitting boundary value is equal to or smaller than the boundary value that precedes the pre-splitting boundary value (1. and 4. in the figure when the pre-splitting boundary value is 200) | N | Causes an error in ALTER TABLE. |
Post-splitting boundary value is smaller than the pre-splitting boundary value and is greater than the preceding boundary value (5. in the figure when the pre-splitting boundary value is 200) | Y | Specified storage conditions and RDAREAs are used to select the post-splitting RDAREAs. | ||
Post-splitting boundary value is equal to or greater than the pre-splitting boundary value (200 when the pre-splitting boundary value is 200) | N | Causes an error in ALTER TABLE. | ||
Omitted | None | Y | RDAREA specified to store the maximum value range among the post-splitting storage conditions | |
'MAX' (3. in the figure) |
Boundary values | Post-splitting boundary value is smaller than the maximum boundary value (1., 2., 4., and 5. in the figure) | N | Causes an error in ALTER TABLE. |
Post-splitting boundary value is greater than the maximum boundary value (3. in the figure) | Y | Specified storage conditions and RDAREAs are used to select the post-splitting RDAREAs. | ||
Omitted | None | Y | RDAREA specified to store the data that is greater than the maximum boundary value. |
Figure 13-21 Boundary value conditions before and after splitting (in the case of boundary value specification)
The post-splitting RDAREAs might include (reuse) the pre-splitting RDAREA or might be all newly created. Furthermore, after splitting, multiple (non-contiguous) storage ranges can be stored in the same RDAREA. During this process, depending on the specifications, the system can automatically combine boundary values or cause an error in ALTER TABLE. The following describes the system actions:
The following table shows the action taken by the system to store multiple storage ranges in the same RDAREA.
Table 13-10 System action for storing multiple storage ranges in the same RDAREA
Specification of RDAREAs after splitting | One of the specified RDAREAs that is being used is outside the splitting target storage range | Results of splitting/combining | System action | ||
---|---|---|---|---|---|
If the focus is placed only on the specified post-splitting RDAREAs, multiple contiguous boundary values are not stored in the same RDAREA. | RDAREAs that are not used in the pre-splitting table are specified. | -- | -- | -- | Splits into the RDAREAs as specified. Corresponds to Example 1-1 in Figure 13-22. |
RDAREAs that are used in the pre-splitting table are specified. | Being used only in the splitting target storage range. | -- | -- | Splits into the RDAREAs as specified. Corresponds to Example 1-2 in Figure 13-22. |
|
Being used outside the splitting target storage range. | Specified as the leading RDAREA after splitting. | Same as the RDAREA immediately preceding the splitting target storage range | Combines the storage range with the immediately preceding boundary value. Corresponds to Example 2-1 in Figure 13-24. |
||
Different from the RDAREA immediately preceding the splitting target storage range | Splits into the RDAREAs as specified. Corresponds to Example 1-3 in Figure 13-22. |
||||
Specified in the middle of the splitting. | -- | Splits into the RDAREAs as specified. Corresponds to Example 1-4 in Figure 13-23. |
|||
Specified at the end of the splitting. | Same as the RDAREA immediately succeeding the splitting target storage range | Combines the storage range with the immediately succeeding boundary value. Corresponds to Example 2-2 in Figure 13-24. |
|||
Different from the RDAREA immediately succeeding the splitting target storage range | Splits into the RDAREAs as specified. Corresponds to Example 1-5 in Figure 13-23. |
||||
If the focus is placed only on the specified post-splitting RDAREAs, multiple contiguous boundary values can be stored in the same RDAREA. | -- | -- | -- | -- | Causes an error in ALTER TABLE. Corresponds to Example 3-1 in Figure 13-25. |
Legend:
--: Not applicable.
Figure 13-22 Example 1 of system action when storing multiple storage ranges in the same RDAREA (1 of 2)
Figure 13-23 Example 1 of system action when storing multiple storage ranges in the same RDAREA (2 of 2)
Figure 13-24 Example 2 of system action when storing multiple storage ranges in the same RDAREA
Figure 13-25 Example 3 of system action when storing multiple storage ranges in the same RDAREA
When an item such as a partitioning key index is defined for a table whose partitioning storage conditions need to be changed, the index data must be stored in RDAREAs, and the index must therefore be split in the same way that table storage RDAREAs are split. The table below shows how to specify a table and RDAREAs other than for the table (partitioning storage conditions when boundary values are being partitioned). If more than one unit of a resource such as those shown in the table is defined, the specification method must be applied to each of them. If any specification is incorrect, the system causes an error in ALTER TABLE. The figure below shows an example of the correspondence between a table and RDAREAs other than for the table. In this example, the table's contents and the contents of the RDAREAs other than for the table are split into three.
Table 13-11 Specifying a table and RDAREAs other than for the table (partitioning storage conditions when partitioning boundary values)
Resource name | Specification method | |
---|---|---|
Column | BLOB column | Specify these resources so that they correspond to the table RDAREAs on a one-to-one basis. If a table RDAREA is specified more than once, specify the resources more than once also so that they correspond to the specified tables. If the existing table RDAREA is to be used after the change, you must specify the RDAREAs for storing the existing indexes and LOB data so that they correspond to the same boundary values. |
Index | Cluster key index Primary key index (including an index for which the primary key and a cluster key are defined) B-tree index |
Figure 13-26 Example of the correspondence between a table and RDAREAs other than for the table
The general rule is that when a storage range is split based on a boundary value, the system automatically deletes the applicable table's existing table data from the RDAREA. However, under some conditions, you can specify that the data is to be retained.
Table 13-12 WITHOUT PURGE clause specification and data handling (in the case of boundary value specification)
Use of the RDAREA after splitting | Can the WITHOUT PURGE clause be specified? | Action when the WITHOUT PURGE clause is specified | Action when the WITHOUT PURGE clause is not specified |
---|---|---|---|
Pre-splitting RDAREA will be used as a post-splitting RDAREA. | Yes | Does not delete the data from the pre-splitting RDAREA. | Deletes the data from the pre-splitting RDAREA. |
Pre-splitting RDAREA will not be used as a post-splitting RDAREA. | No | Not applicable |
Figure 13-27 Example of an RDAREA from which data is deleted because WITHOUT PURGE is not specified
Figure 13-28 Examples of handling data in the post-splitting RDAREAs (valid and invalid specifications of WITHOUT PURGE)
Figure 13-29 Examples of RDAREA data deletion
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.