Nonstop Database, HiRDB Version 9 Installation and Design Guide

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

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. If the inner replica facility is being used, also calculate the table stored in the replica RDAREA as one table. For a HiRDB parallel server configuration, 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 configuration 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.
    In addition, if you want to further increase storage efficiency, specify a reuse option value for OPTION in SEGMENT REUSE. By specifying a reuse option value, you can use the following features:
    Reuse option value for each feature Feature Cases in which storage efficiency is expected to improve
    1 UPDATE operation support
    • UPDATE operations on fixed length data or ADT columns that contain NULL values
    • UPDATE operations on BINARY columns
    • UPDATE operations on VARCHAR, NVARCHAR, and MVARCHAR columns (with NO SPLIT specified)
    • The number of search mode switchovers is small compared to the number of segments already allocated (checkable using the pddbst command).
    2 Improved storage efficiency of tables with many branch rows Operations on tables that create branch rows
    3 UPDATE operation support and improved storage efficiency for tables with many branch rows
    • UPDATE operations on fixed length data or ADT columns that contain NULL values
    • UPDATE operations on BINARY columns
    • UPDATE operations on VARCHAR, NVARCHAR, and MVARCHAR columns (with NO SPLIT specified)
    • The number of search mode switchovers is small compared to the number of segments already allocated (checkable using the pddbst command).
    • Operations on tables that create branch rows
    Note that if you apply OPTION 1 (UPDATE support), page allocation at the time of the UPDATE operation proceeds from the last segment (in new page allocation mode), or from the segment at the start position of the previous search (in free page reuse mode). In this case, free space created during data loading or reorganization is no longer used preferentially. We therefore recommend, for tables in which OPTION 1 is specified, that you specify (0,0) for PCTFREE in the CREATE TABLE statement.
  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.