Nonstop Database, HiRDB Version 9 System Operation Guide

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

13.13.5 Reusing RDAREAs

In the case of a database in which the volume of data increases over time, you can reuse RDAREAs by deleting data from RDAREAs storing old data and reusing those RDAREAs to store new data. The following figure shows an example of reusing an RDAREA.

Figure 13-83 Example of reusing an RDAREA

[Figure]

Note: The numbers in the figure (1 and 2) correspond to the numbers in the following procedure.

Procedure
  1. The combine facility for partitioning storage conditions is used to combine into RDAREA R02 the data for 2002 and earlier, which is stored in R01 and R02. During this process, the system deletes all data from R01.
  2. The split facility for partitioning storage conditions can be used to split the data for 2004 and beyond, and to store the data for 2004 in R04 and the data for 2005 and beyond in R01; this means that R01, which had been used to store the data for 2001 and earlier, is reused.

The following figure shows the procedure for reusing RDAREAs.

Figure 13-84 Procedure for reusing RDAREAs

[Figure]

Note: The numbers in the figure (1 and 2) correspond to the numbers in the following procedure.

Procedure
  1. To separate R01 from the table, use ALTER TABLE to combine the minimum boundary value ('2001-12-31') into the boundary value ('2002-12-31') that is one increment greater than the minimum boundary value. For the post-combination RDAREAs, specify the RDAREAs (R02 and RI02) that will store the boundary value that is one increment greater than the minimum boundary value. Because the data in R02 must be retained, specify WITHOUT PURGE. As a result, R01 becomes separated from the table in terms of definition, and the data is deleted from the table in R01.
  2. Use ALTER TABLE to split the RDAREA (R04) storing values greater than the maximum boundary value at a value ('2004-12-31') that is equal to or greater than the maximum value of the partitioning keys stored in that RDAREA. For the post-splitting RDAREAs, specify the RDAREAs (R04 and RI04) that used to store values greater than the maximum boundary value and the RDAREAs (R01 and RI01) that used to store values smaller than the minimum boundary value. Because the data in R04 must be retained, specify WITHOUT PURGE.
    Note that if there is data for '2005-1-1' and beyond in R04, there is a possibility that data not matching the storage conditions might remain in R04. For details, see 13.13.1(2) Example 2 (splitting an RDAREA without deleting its data and using the pre-split RDAREA after splitting).