Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

13.12.8 Splitting an RDAREA (in the case of storage condition specification)

Organization of this subsection
(1) Rules for changing storage conditions
(2) RDAREA with OTHERS specified
(3) Determining the RDAREAs to be used after splitting
(4) How to specify a post-split storage condition
(5) When a resource such as a partitioning key index has been defined for the table
(6) Handling of data in the split-target RDAREA

(1) Rules for changing storage conditions

This subsection describes the rules for changing storage conditions.

(a) Maximum value

When you change storage conditions, you must observe the maximum values shown in the following table.

Table 13-18 Maximum values for the split facility (in the case of storage condition 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 storage conditions after splitting (including RDAREAs with no storage condition specified) 15000
(b) Rules for splitting

The RDAREA to be split must satisfy specific conditions. The following table describes under which conditions RDAREAs can be split.

Table 13-19 Determination of whether an RDAREA can be split

RDAREA to be split#1 Storage condition defined for table Whether splittable Description
RDAREA for which storage condition is specified Only one storage condition is specified for the RDAREA. N Causes in an error in ALTER TABLE.
Multiple storage conditions are specified for the RDAREA. Y An example of splitting an RDAREA with storage conditions specified is shown in Figure 13-35 Example of splitting an RDAREA with storage conditions specified.
RDAREA for which no storage condition is specified -- Y An example of splitting an RDAREA with no storage condition specified is shown in Figure 13-36 Example of splitting an RDAREA with no storage condition specified.
RDAREA with OTHERS specified#2 Storage conditions are specified for all RDAREAs. Y An example of splitting an RDAREA with OTHERS specified is shown in Figure 13-37 Example of splitting an RDAREA with OTHERS specified.
There is an RDAREA with no storage condition specified. N An example where an RDAREA with OTHERS specified cannot be split is shown in Figure 13-38 Example where an RDAREA with OTHERS specified cannot be split.

Legend:
Y: Can be split.
N: Cannot be split.
--: Not applicable.

#1
The RDAREA to be split is the one specified in the pre-change RDAREA information list for CHANGE RDAREA in the ALTER TABLE statement.

#2
For details about an RDAREA with OTHERS specified, see 13.12.8(2) RDAREA with OTHERS specified.

Figure 13-35 Example of splitting an RDAREA with storage conditions specified

[Figure]

Figure 13-36 Example of splitting an RDAREA with no storage condition specified

[Figure]

Figure 13-37 Example of splitting an RDAREA with OTHERS specified

[Figure]

Figure 13-38 Example where an RDAREA with OTHERS specified cannot be split

[Figure]

(2) RDAREA with OTHERS specified

When storage conditions are specified, you can split a dummy RDAREA with no entity. You can also split an RDAREA into an RDAREA with entity and a dummy RDAREA. Such a dummy RDAREA with no entity is called an RDAREA with OTHERS specified. RDAREAs with OTHERS specified are treated as RDAREAs with no storage condition specified during split or combine processing. The following describes how to use an RDAREA with OTHERS specified:

(3) Determining the RDAREAs to be used after splitting

The RDAREAs to be used to store data are determined by the RDAREAs and the post-split storage conditions specified in CHANGE RDAREA in the ALTER TABLE statement. The RDAREAs obtained after splitting might include the RDAREA subject to splitting or new RDAREAs. However, the same name cannot be specified for an RDAREA obtained after splitting.

The following describes whether the split-target RDAREA can be included in the post-split RDAREAs.

(a) When multiple storage conditions have been specified for the split-target RDAREA

The following table shows whether an RDAREA to be split (for which multiple storage conditions have been specified) can be included among the post-split RDAREAs.

Table 13-20 Whether the split-target RDAREA (for which multiple storage conditions have been specified) can be included in the post-split RDAREAs

Conditions for the post-split RDAREAs that are specified in CHANGE RDAREA in ALTER TABLE Whether post-split RDAREAs can be specified
When there is an RDAREA with no storage condition specified When storage conditions have been specified for all RDAREAs
When the split-target RDAREA is not specified Only new RDAREAs are specified. Y (see Figure 13-39 Case where splitting is supported (part 1))
An RDAREA with a storage condition specified is included. N (see Figure 13-41 Case where splitting is not supported (part 1))
An RDAREA with no storage condition specified is included. N (see Figure 13-41 Case where splitting is not supported (part 1)) --
An RDAREA with OTHERS specified is specified. N (see Figure 13-42 Case where splitting is not supported (part 2))
When the split-target RDAREA is specified All RDAREAs are new other than the split-target RDAREA. Y (see Figure 13-40 Case where splitting is supported (part 2))
An RDAREA with a storage condition specified is included. N (see Figure 13-41 Case where splitting is not supported (part 1))
An RDAREA with no storage condition specified is included. N (see Figure 13-41 Case where splitting is not supported (part 1)) --
An RDAREA with OTHERS specified is specified. N (see Figure 13-42 Case where splitting is not supported (part 2))

Legend:
Y: Can be split.
N: Cannot be split.
--: Not applicable.

Figure 13-39 Case where splitting is supported (part 1)

[Figure]

Figure 13-40 Case where splitting is supported (part 2)

[Figure]

Figure 13-41 Case where splitting is not supported (part 1)

[Figure]

Figure 13-42 Case where splitting is not supported (part 2)

[Figure]
(b) When no storage condition has been specified for the split-target RDAREA

The following table shows whether an RDAREA to be split (for which no storage condition has been specified) can be included among the post-split RDAREAs.

Table 13-21 Whether the split-target RDAREA (for which no storage condition has been specified) can be included in the post-split RDAREAs

Conditions for the post-split RDAREAs that are specified in CHANGE RDAREA in ALTER TABLE Whether post-split RDAREAs can be specified
When there is an RDAREA with no storage condition specified When storage conditions have been specified for all RDAREAs
When the split-target RDAREA is not specified Only new RDAREAs are specified. No RDAREA with OTHERS specified is included. Y (see Figure 13-43 Case where splitting is supported (part 3)) --
An RDAREA with OTHERS specified is included. Y (see Figure 13-44 Case where splitting is supported (part 4)) --
An RDAREA with a storage condition specified is included. N (see Figure 13-47 Case where splitting is not supported (part 3)) --
When the split-target RDAREA is specified All RDAREAs are new other than the split-target RDAREA. No RDAREA with OTHERS specified is included. Y (see Figure 13-45 Case where splitting is supported (part 5)) --
An RDAREA with OTHERS specified is included. Y (see Figure 13-46 Case where splitting is supported (part 6)) --
An RDAREA with a storage condition specified is included. N (see Figure 13-47 Case where splitting is not supported (part 3)) --

Legend:
Y: Can be split.
N: Cannot be split.
--: Not applicable.

Figure 13-43 Case where splitting is supported (part 3)

[Figure]

Figure 13-44 Case where splitting is supported (part 4)

[Figure]
Note
In this example, data other than 'A', 'B', 'C', 'D', and 'E' can no longer be referenced or inserted after splitting. Therefore, caution is required if you specify OTHERS for a post-split RDAREA.

Figure 13-45 Case where splitting is supported (part 5)

[Figure]

Figure 13-46 Case where splitting is supported (part 6)

[Figure]

Note
In this example, data other than 'A', 'B', 'C', 'D', and 'E' can no longer be referenced or inserted after splitting. Therefore, caution is required if you specify OTHERS for a post-split RDAREA.

Figure 13-47 Case where splitting is not supported (part 3)

[Figure]
(c) When OTHERS is specified for the split-target RDAREA

The following table shows whether an RDAREA to be split (with OTHERS specified) can be included among the post-split RDAREAs.

Table 13-22 Whether the split-target RDAREA (with OTHERS specified) can be included in the post-split RDAREAs

Conditions for the post-split RDAREAs that are specified in CHANGE RDAREA in ALTER TABLE Whether post-split RDAREAs can be specified
When there is an RDAREA with no storage condition specified When storage conditions have been specified for all RDAREAs
The post-split RDAREAs include an RDAREA with OTHERS specified Only new RDAREAs are specified. N Y (see Figure 13-48 Case where splitting is supported (part 7))
An RDAREA with a storage condition specified is included. N N (see Figure 13-50 Case where splitting is not supported (part 4))
The post-split RDAREAs include no RDAREA with OTHERS specified Only new RDAREAs are specified. N Y (see Figure 13-49 Case where splitting is supported (part 8))
An RDAREA with a storage condition specified is included. N N (see Figure 13-50 Case where splitting is not supported (part 4))

Legend:
Y: Can be split.
N: Cannot be split.

Figure 13-48 Case where splitting is supported (part 7)

[Figure]

Figure 13-49 Case where splitting is supported (part 8)

[Figure]

Figure 13-50 Case where splitting is not supported (part 4)

[Figure]

(4) How to specify a post-split storage condition

You must specify a post-split storage condition for the split-target RDAREA, and the specified storage condition must satisfy all the following conditions:

The following table shows in which cases a post-split storage condition can be specified.

Table 13-23 Whether a post-split storage condition can be specified

Split-target RDAREA Post-split storage condition Specifiable
RDAREA for which storage conditions are specified A storage condition applicable to the split-target RDAREA is specified. All storage conditions are specified. Y
At least one storage condition is not specified. N
Storage conditions that are not included in the split-target RDAREA are specified. N
No storage conditions are specified. N
RDAREA for which no storage condition is specified A storage condition already specified in the table definitions is included. N
The storage conditions already specified in the table definitions are not included. There is an RDAREA with no storage condition specified. Y
There is no RDAREA with no storage condition specified. N
RDAREA with OTHERS specified The storage condition already specified in the table definitions is included. N
The storage conditions already specified in the table definitions are not included. Y

Legend:
Y: Can be specified.
N: Cannot be specified.

You can specify one or more post-split storage conditions for each post-split RDAREA.

(5) When a resource such as a partitioning key index has been defined for the table

If a resource such as a partitioning key index has been defined for a table whose storage conditions are to be changed, you must also split the index storage RDAREAs when you split table storage RDAREAs. The following table shows the resources that are subject to splitting when storage conditions are changed.

The figure below shows an example of splitting when a resource such as a partitioning key index has been defined for the table.

Table 13-24 Resources subject to splitting when storage conditions are changed

Resource defined for the table Splitting method
Index Split in such a manner that the index storage RDAREAs have a 1-to-1 correspondence with the table storage RDAREAs.
Cluster key
Primary key
LOB column

Figure 13-51 Example of splitting when a resource such as a partitioning key index has been defined for the table

[Figure]

During split processing, the following rules apply:

(6) Handling of data in the split-target RDAREA

When ALTER TABLE is executed, data is normally deleted from the split-target RDAREA. Data is also deleted from the following corresponding RDAREAs:

The following figure shows the data that is deleted during split processing.

Figure 13-52 Data that is deleted during split processing

[Figure]

(a) Case in which data is not deleted

If the following conditions are all satisfied, data can be retained because data in the split-target RDAREA might be usable as is:

  1. The split-target RDAREA is to be used after split processing.
  2. The split-target RDAREA contains only data that satisfies the post-splitting storage conditions.
  3. The split-target index storage RDAREA or LOB column storage RDAREA also satisfies conditions 1 and 2.

If data is not to be deleted, specify WITHOUT PURGE in ALTER TABLE. If use of the split-target RDAREA after split processing is not specified but WITHOUT PURGE is specified, ALTER TABLE results in an error.

Figure 13-53 shows the case where WITHOUT PURGE takes effect, and Figure 13-54 shows the case where WITHOUT PURGE results in an error.

Figure 13-53 Case where WITHOUT PURGE takes effect

[Figure]

#: If RD01 contains data that is ='B' before split processing, the data that does not satisfy the storage condition remains in RD01 after split processing. Therefore, you must make sure that RD01 does not contain data that is ='A' before split processing.

Figure 13-54 Case where WITHOUT PURGE results in an error

[Figure]

(b) Notes about specifying WITHOUT PURGE

If split processing is performed with WITHOUT PURGE specified, HiRDB does not check whether all the data in the RDAREA satisfies the post-splitting storage conditions. If the RDAREA contains data that does not satisfy the storage conditions, HiRDB does not function correctly during SQL execution. Therefore, when you change the storage conditions specifying WITHOUT PURGE, check the data in the split-target RDAREA.

Hint
Normally, do not specify WITHOUT PURGE when you change storage conditions. For details about how to change storage conditions, see 13.13 Operation when changing a table's partitioning storage conditions.
(c) Notes about specifying OTHERS for post-split RDAREAs

If both of the conditions listed below are satisfied, storage conditions are specified for all post-split RDAREAs (there will be no RDAREA with no storage condition specified after split processing):

Any data that does not satisfy the post-splitting storage conditions will have no storage RDAREA. The following figure shows an example in which there is no storage RDAREA for data after split processing.

Figure 13-55 Example where there is no storage RDAREA for data after split processing

[Figure]

#: Data whose storage condition is not ='C' will have no storage RDAREA after split processing.