14.5.5 Environment settings

The environment settings for use of the free space reusage facility are explained in this section.

  1. Use the pd_assurance_table_no operand to specify the number of tables that will use the free space reusage facility.
    For partitioning tables, calculate one table per partition. For a HiRDB/Parallel Server, make the calculation separately for each back-end server, and specify the highest number in this operand.
    The free space reusage facility can be used for tables defined by CREATE TABLE or modified by ALTER TABLE up to the number of times (number reserved) specified in the pd_assurance_table_no operand. If an insert is executed on a table for which the number reserved has been reached, the KFPH22030-W message is output, and the free space reusage facility is not applied. In such a case, the free space reusage facility will be applied for all defined tables if you increase the value of the pd_assurance_table_no operand. If the ALTER TABLE statement is specified with ADD RDAREA to add table storage RDAREAs such that the defined number exceeds the reserved number or the number defined for the HiRDB/Parallel Server exceeds the reserved number, free space reusage may or may not be applied to each RDAREA by partitioning tables for which free space reusage is defined.
  2. Estimate the number of segments to be used for free space reusage (estimate the total number of segments from the total amount of data in the tables; see 16.1 Determining the size of a user RDAREA), and specify the estimated number of segments in the CREATE TABLE definition SQL statement with the SEGMENT REUSE option specified. For tables already created, use the ALTER TABLE statement with the SEGMENT REUSE option specified. The number of segments specified here is applicable to all RDAREAs.
  3. To change the number of segments once it has been specified, you can specify the number of segments again using ALTER TABLE with the SEGMENT REUSE option specified. HiRDB will process as follows, depending on the page search mode and the value specified for the number of segments:
    • When in the new page allocate mode
      If the specified number of segments is fewer than the number of used segments, free space reusage will be executed once all free space has disappeared from the last allocated segment.
    • When in the free page reuse mode
      If the number of segments specified is not greater than the number of used segments, nothing changes. If the number of segments specified is greater than the number of used segments, then once all free space has been used free space reusage will stop briefly, at which point new unused pages will be allocated.
  4. If there is temporarily a large amount of addition due to such as batch processing, and you want to temporarily stop the free space reusage facility, specify ALTER TABLE with SEGMENT REUSE NO specified. When this is done, the free space reusage facility will stop immediately, and unused segments will be newly allocated.
  5. To suppress the RDAREA segment usage notification messages (KFPH00211-I or KFPA12300-I) that are output when a table that uses the free space reusage facility secures segments, specify N in the pd_rdarea_warning_point_msgout operand.
    If deletion (updating) and insertion are included and there is no increase in the amount of data, using the free space reusage facility removes the need to reorganize the table or expand RDAREAs. For this reason, the user also does not need to monitor the output of RDAREA segment usage notification messages. If deletion (updating) and insertion are included, there is no increase in the amount of data, and all the following conditions are met, output of RDAREA segment usage notification messages can be suppressed.
    • Only tables that use the free space reusage facility are defined in the storage RDAREA.
    • The table is a FIX attribute table or does not include variable length columns (that is, tables in which the data size does not increase).
    However, in the following cases, the free space reusage facility might not run, so you must output and monitor the RDAREA segment usage notification messages. Then, you must take corrective action according to the RDAREA usage status.
    • The number of tables that define the free space reusage facility exceeds the reserved number specified in the pd_assurance_table_no operand.
    • Multiple tables that use the free space reusage facility are defined for the storage RDAREA, and the number of SEGMENT REUSE segments specified in the table definition is not equal to or greater than the maximum data size.