Nonstop Database, HiRDB Version 9 System Operation Guide

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

19.2.2 Updating optimizing information

Organization of this subsection
(1) Triggers for updating optimizing information
(2) Procedure for updating optimizing information

(1) Triggers for updating optimizing information

When a database's status changes, it no longer matches the optimizing information. In this case, the optimal access path cannot be selected during a search, and search performance might decrease as a result. Therefore, if a database's status has changed, consider updating the optimizing information.

A database's status changes in response to the following triggers:

(2) Procedure for updating optimizing information

The following is the procedure for updating optimizing information.

Procedure
  1. Determine whether the optimizing information needs to be updated.
    Taking into consideration the content described in (1) Triggers for updating optimizing information, determine whether the optimizing information needs to be updated.
  2. Save the optimizing information that you are currently registering.
    Use the pdgetcst command to save the optimizing information to a parameter file that contains optimized information. For details about how to save optimizing information, see 19.3.3 Saving optimizing information to a parameter file that contains optimized information.
    Hint
    Updating the optimizing information enables you to select the optimal access path, and generally improves accuracy of optimization. However, optimization accuracy might not improve in some cases even once the optimizing information has been updated. Therefore, back up the optimizing information before updating it so that you can undo the update if necessary.
    If a problem such as performance degradation occurs, you can use the saved parameter file that contains optimized information to restore the optimizing information to the pre-update state.
    For details about how to restore the optimizing information to the pre-update state, see 19.2.3 Restoring optimizing information.
    Command execution example:
    This example saves the optimizing information that is currently being registered for table USER1.T1 to the parameter file that contains optimized information (/tmp/optinfo_20101014).
     
    pdgetcst -e /tmp/optinfo_20101014 -a USER1 -t T1
     
  3. Update the optimizing information.
    Use the pdgetcst command to collect and register optimizing information. This step updates the optimizing information.
    Command execution example:
    Optimizing information is collected and registered in order to update the optimizing information for table USER1.T1.
     
    pdgetcst -a USER1 -t T1 -c lvl2