Nonstop Database, HiRDB Version 9 System Operation Guide
The following table shows the maximum and minimum values for the combine facility.
Table 13-38 Maximum and minimum values for the combine facility (matrix partitioning)
Item | Maximum value | Minimum value | What happens when the maximum or minimum value is exceeded? |
---|---|---|---|
Number of RDAREA groups storing specific boundary values that can be combined | 16 | 2 | An error occurs in ALTER TABLE. |
Number of RDAREA groups storing specific boundary values following a single combining operation | 1 (fixed) | ||
Total number of split RDAREAs (excluding duplications) resulting from the combining process | 1024 | 1 |
All RDAREAs that satisfy specified storage conditions are selected for combining, based on multiple column names and boundary values to be changed, specified in CHANGE RDAREA of ALTER TABLE. Because specification of column names and boundary values to be changed identifies the target RDAREAs, there is no need to specify the RDAREAs themselves. The multiple boundary values must be specified in ascending order; they must also be specified to account for all the contiguous storage conditions defined for the table. For example, if boundary values 10, 20, 30, and 40 are defined in a table definition, specifying 10, 30, and 40 (and skipping specification of 20) will cause an error in ALTER TABLE.
The following table shows the specification of ALTER TABLE and how the RDAREAs to be combined are determined.
Table 13-39 ALTER TABLE specification and determination of RDAREAs to be combined (matrix partitioning)
Specification | Condition 1 | Condition 2 | Action |
---|---|---|---|
Boundary value | Boundary values are specified in the table definition. | Boundary values are specified in the order in which they are defined. | All RDAREAs that satisfy the specified storage conditions become the RDAREAs that will be combined. |
Boundary values are not specified in their definition order. | An error occurs in ALTER TABLE. | ||
No boundary values are specified in the table definition. | None | ||
'MAX' | None | None | RDAREAs in the RDAREA groups storing specific boundary values that store data with partitioning key values greater than the maximum boundary value will be combined. |
The RDAREA for storing all storage conditions after combining is determined by comparing RDAREAs with the post-change boundary value list (a combination of boundary values specified for a certain dimension) for the dimension specified in CHANGE RDAREA of ALTER TABLE. The combined boundary value must equal the maximum value of the pre-combination boundary values.
The post-combination RDAREA might be one of the pre-combination RDAREAs, or it might be a newly created RDAREA. The following table shows the RDAREAs that can be specified as the post-combination RDAREA.
Table 13-40 RDAREAs that can be specified as the post-combination RDAREA (matrix partitioning)
RDAREA | Can it be used as the post-combination RDAREA? | |
---|---|---|
Same as the pre-combination RDAREAs | Yes | |
None of the pre-combination RDAREAs | RDAREA that is already being used for a boundary value of the same table (but not a boundary value that is being combined) | Yes |
RDAREA that is not being used for this table (a newly created RDAREA) | Yes |
You can combine RDAREAs so that multiple storage conditions are stored in one RDAREA after combining.
In the case of a matrix-partitioned table, the method of specifying the RDAREA for CHANGE RDAREA of ALTER TABLE differs depending on whether the first-dimension RDAREAs or the second-dimension RDAREAs are combined. The number of RDAREA groups storing specific boundary values that are combined, and the number of RDAREAs in an RDAREA group storing specific boundary values that are combined, depend on the number of splits in the dimension that is not combined. The following table shows the relationship between the dimension to be combined and the number of specified RDAREAs. The figure below displays the examples used in the table.
Table 13-41 Relationship between the dimension to be combined and the number of specified RDAREAs
Dimension to be combined | Number of RDAREA groups storing specific boundary values that are to be combined | Number of RDAREAs in an RDAREA group storing specific boundary values that are to be combined |
---|---|---|
First dimension | Number of boundary values specified in the changed boundary value list (2 in Example 1 in the figure) |
Number of splits in the second dimension (3 in Example 1 in the figure) |
Second dimension | Number of splits in the first dimension (4 in Example 2 in the figure) |
Number of boundary values specified in the changed boundary value list (2 in Example 2 in the figure) |
Figure 13-81 RDAREA specification following RDAREA combination (matrix partitioning)
When a partitioning key index or the like is defined for a table whose partitioning storage conditions are to be changed, the index data must be stored in RDAREAs that form pairs with table RDAREAs. The following table shows how to specify a table and RDAREAs other than for the table (matrix partitioning). If more than one unit of a resource such as is shown in the table below 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.
Table 13-42 Specifying a table and RDAREAs other than for the table (matrix partitioning)
Resource name | Specification method | |
---|---|---|
Column | BLOB column | Specify these resources so that they correspond one-to-one to the table RDAREAs. 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 index (including primary cluster index) B-tree index |
The general rule is that when storage ranges are combined based on a boundary value, the system automatically deletes the data from the RDAREAs. However, under some conditions, you can specify that the data be retained.
Table 13-43 WITHOUT PURGE clause specification and data handling (in the case of matrix partitioning)
Use of the RDAREA after change | 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-combination RDAREA group storing specific boundary values will be included in the post-combination RDAREA group storing specific boundary values. | Yes | Does not delete the data from the post-combination RDAREA group storing specific boundary values. | Deletes all data from the pre-combination RDAREA group storing specific boundary values. |
Pre-combination RDAREA group storing specific boundary values will not be included in the post-combination RDAREA group storing specific boundary values. | No | Deletes all data from the pre-combination RDAREA group storing specific boundary values. |
Figure 13-82 Handling RDAREAs that undergo changes (when the WITHOUT PURGE clause is specified)
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.