Nonstop Database, HiRDB Version 9 System Operation Guide

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

13.12.9 Combining RDAREAs (in the case of storage condition specification)

Organization of this subsection
(1) Rules for changing storage conditions
(2) RDAREA with OTHERS specified
(3) How to determine the combined RDAREA
(4) When a resource such as a partitioning key index has been defined for the table
(5) Handling of data in a combination-target RDAREA

(1) Rules for changing storage conditions

This subsection describes the rules for changing storage conditions.

(a) Maximum and minimum values

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

Table 13-25 Maximum and minimum values for the combine facility

Item Maximum value Minimum value Result when the value is not within the range of the minimum and maximum values
Number of RDAREAs that can be combined in a single operation 16 2 Causes an error in ALTER TABLE.
Number of RDAREAs that are combined after execution of ALTER TABLE 1 (fixed)
Total number of RDAREAs resulting from combining -- 1

Legend:
--: Not applicable.
(b) Rules for combining

The RDAREAs to be combined must satisfy specific conditions. The following table shows under which conditions RDAREAs can be combined.

Table 13-26 Determination of whether RDAREAs can be combined

RDAREAs to be combined Whether combinable Description
The combination-target RDAREAs are specified in the table definition. Y RDAREAs can be combined.
The combination-target RDAREAs contain an RDAREA that is not specified in the table definition. N Causes an error in ALTER TABLE.
RDAREA with OTHERS specified# Storage conditions have been specified for all RDAREAs. Y An example of combining an RDAREA with OTHERS specified is shown in Figure 13-56 Example of combining an RDAREA with OTHERS specified.
There is an RDAREA with no storage condition specified. N Causes an error in ALTER TABLE. An example in which an RDAREA with OTHERS specified cannot be combined is shown in Figure 13-57 Example where an RDAREA with OTHERS specified cannot be combined.

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

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

Figure 13-56 Example of combining an RDAREA with OTHERS specified

[Figure]

Figure 13-57 Example where an RDAREA with OTHERS specified cannot be combined

[Figure]

(2) RDAREA with OTHERS specified

When storage conditions are specified, you can combine dummy RDAREAs with no entity. You can also integrate an RDAREA in 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 RDAREAs with OTHERS specified:

(3) How to determine the combined RDAREA

You specify the combined RDAREA in CHANGE RDAREA of ALTER TABLE. This RDAREA stores the data that satisfies all storage conditions for the combination-target RDAREAs. The resulting combined RDAREA might be one of the combination-target RDAREAs or a newly provided RDAREA.

Note that the RDAREAs might not be combined depending on the conditions during combine processing. This subsection describes the permitted and prohibited combinations of combination-target RDAREAs and post-combination RDAREA.

(a) Total number of post-combination RDAREAs

There is a condition on the total number of post-combination RDAREAs. The following table shows the relationship between the conditions during combine processing and the total number of post-combination RDAREAs.

Table 13-27 Relationship between the conditions during combine processing and the total number of post-combination RDAREAs

Condition during combine processing Total number of post-combination RDAREAs
Condition for combination-target table Condition for combination-target RDAREAs. 1 2 or more
There is an RDAREA with no storage condition specified. There is an RDAREA with OTHERS specified. N#1
There is no RDAREA with OTHERS specified. There is an RDAREA with no storage condition specified. N (see Figure 13-63 Case where combine processing is not supported (part 1)) Y (see Figure 13-58 Case where combine processing is supported (part 1))
There is no RDAREA with no storage condition specified. -- Y (see Figure 13-59 Case where combine processing is supported (part 2))
There is no RDAREA with no storage condition specified. There is an RDAREA with OTHERS specified. N (see Figure 13-64 Case where combine processing is not supported (part 2)) Y (see Figure 13-60 Case where combine processing is supported (part 3))
There is no RDAREA with OTHERS specified. Y#2 (see Figure 13-61 Case where combine processing is supported (part 4)) Y (see Figure 13-62 Case where combine processing is supported (part 5))

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

#1
If the combination-target table has an RDAREA with no storage condition specified, an RDAREA with OTHERS specified cannot be specified as a combination-target RDAREA.

#2
RDAREAs cannot be combined if an index has been defined for the combination-target table.

Figure 13-58 Case where combine processing is supported (part 1)

[Figure]

Figure 13-59 Case where combine processing is supported (part 2)

[Figure]

Figure 13-60 Case where combine processing is supported (part 3)

[Figure]

Figure 13-61 Case where combine processing is supported (part 4)

[Figure]

Figure 13-62 Case where combine processing is supported (part 5)

[Figure]

Figure 13-63 Case where combine processing is not supported (part 1)

[Figure]

Figure 13-64 Case where combine processing is not supported (part 2)

[Figure]
(b) When combining only RDAREAs with storage conditions specified

The following table lists and describes the specification conditions for the post-combination RDAREA and whether combine processing is supported (when only RDAREAs with storage conditions specified are to be combined).

Table 13-28 Specification conditions for the post-combination RDAREA and whether combine processing is supported (when only RDAREAs with storage conditions specified are to be combined)

Specification condition for post-combination RDAREA Whether combine processing is supported
No combination-target RDAREA is used after combine processing. One of the table storage RDAREAs is specified as the post-combination RDAREA. N (RDAREA specification error)
An RDAREA other than a table storage RDAREAs is specified as the post-combination RDAREA. Y (see Figure 13-65 Case where combine processing is supported (part 6))
An RDAREA with OTHERS specified is specified as the post-combination RDAREA. N (see Figure 13-67 Case where combine processing is not supported (part 3))
A combination-target RDAREA is used after combine processing. Y (see Figure 13-66 Case where combine processing is supported (part 7))

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

Figure 13-65 Case where combine processing is supported (part 6)

[Figure]

Figure 13-66 Case where combine processing is supported (part 7)

[Figure]

Figure 13-67 Case where combine processing is not supported (part 3)

[Figure]
(c) When an RDAREA with no storage condition specified is to be combined

The following table lists and describes the specification conditions for the post-combination RDAREA and whether combine processing is supported (when an RDAREA with no storage condition specified is to be combined).

Table 13-29 Specification conditions for the post-combination RDAREA and whether combine processing is supported (when an RDAREA with no storage condition specified is to be combined)

Specification condition for post-combination RDAREA Conditions for table storage RDAREA after combine processing
When there is an RDAREA with no storage condition specified When there is no RDAREA with no storage condition specified
No combination-target RDAREA is used after combine processing. One of the table storage RDAREAs is specified as the post-combination RDAREA. N (RDAREA specification error) --
An RDAREA other than one of the table storage RDAREAs is specified as the post-combination RDAREA. Y (see Figure 13-68 Case where combine processing is supported (part 8)) --
An RDAREA with OTHERS specified is specified as the post-combination RDAREA. Y (see Figure 13-69 Case where combine processing is supported (part 9)) --
A combination-target RDAREA is used after combine processing. Y (see Figure 13-70 Case where combine processing is supported (part 10)) --

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

Figure 13-68 Case where combine processing is supported (part 8)

[Figure]

Figure 13-69 Case where combine processing is supported (part 9)

[Figure]

Figure 13-70 Case where combine processing is supported (part 10)

[Figure]
(d) When an RDAREA with OTHERS specified is to be combined

The following table lists and describes the specification conditions for the post-combination RDAREA and whether combine processing is supported (when an RDAREA with OTHERS specified is to be combined).

Table 13-30 Specification conditions for the post-combination RDAREA and whether combine processing is supported (when an RDAREA with OTHERS specified is to be combined)

Specification condition for post-combination RDAREA Conditions for table storage RDAREA after combine processing
When there is an RDAREA with no storage condition specified When there is no RDAREA with no storage condition specified
No combination-target RDAREA is used after combine processing. An RDAREA with storage conditions specified is specified as the post-combination RDAREA. N (OTHERS cannot be specified) N (specified RDAREA is not a target of combine processing)
An RDAREA other than one of the table storage RDAREAs is specified as the post-combination RDAREA. N (OTHERS cannot be specified) Y (see Figure 13-71 Case where combine processing is supported (part 11))
An RDAREA with OTHERS specified is specified as the post-combination RDAREA. N (OTHERS cannot be specified) Y (see Figure 13-72 Case where combine processing is supported (part 12))
A combination-target RDAREA is used after combine processing. An RDAREA with storage conditions specified is specified as the post-combination RDAREA. N (OTHERS cannot be specified) Y (see Figure 13-71 Case where combine processing is supported (part 11))
An RDAREA with OTHERS specified is specified as the post-combination RDAREA. N (OTHERS cannot be specified) Y (see Figure 13-72 Case where combine processing is supported (part 12))

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

Figure 13-71 Case where combine processing is supported (part 11)

[Figure]

Figure 13-72 Case where combine processing is supported (part 12)

[Figure]

(4) 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 the combination-target table, you must combine not only the table storage RDAREAs but also the index storage RDAREAs. The following table shows the resources that must be combined at the same time.

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

Table 13-31 Resources subject to combining when storage conditions are changed

Resource defined for the table Combining method
Index Combine so that the index storage RDAREAs have a 1-to-1 correspondence with the table storage RDAREAs.
Cluster key
Primary key
LOB column

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

[Figure]

The following rules apply to combine processing:

(5) Handling of data in a combination-target RDAREA

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

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

Figure 13-74 Data that is deleted during combine 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 combination-target RDAREA might be usable as is:

  1. The combination-target RDAREA is to be used after combine processing.
  2. The combination-target index storage RDAREA or LOB column storage RDAREA also satisfies condition 1.

If data is not to be deleted, you must specify WITHOUT PURGE in ALTER TABLE. If use of a combination-target RDAREA after combine processing is not specified but WITHOUT PURGE is specified, ALTER TABLE results in an error. The following figure shows the processing when WITHOUT PURGE is specified.

Figure 13-75 Processing when WITHOUT PURGE is specified

[Figure]

Explanation:
Because RDAREAs are combined into RD02, the data in RD02 (whose storage condition is ='B') is not deleted. The data in RD03 and RD04 (whose storage conditions are ='C' and ='D') is deleted.
Note
If data is saved with WITHOUT PURGE specified, and the pre-combination data is unloaded and then loaded into the post-combination RDAREA, that data is registered twice. Therefore, if you save data with WITHOUT PURGE specified, do not perform data unloading or data loading.
In the case of Figure 13-75, if the data in RD02 (whose storage condition is ='B') is unloaded and then loaded into the post-combination RDAREA, the data is registered twice.
(b) Notes about combining into an RDAREA with OTHERS specified

If combine processing is performed when both the following conditions are satisfied, there will be no RDAREA for storing pre-combination data:

Figure 13-76 Case where there will be no RDAREA for storing data after combine processing (part 1) and Figure 13-77 Case where there will be no RDAREA for storing data after combine processing (part 2) show the cases where there will be no RDAREA for storing data after combine processing.

Figure 13-76 Case where there will be no RDAREA for storing data after combine processing (part 1)

[Figure]

Figure 13-77 Case where there will be no RDAREA for storing data after combine processing (part 2)

[Figure]