Nonstop Database, HiRDB Version 9 Command Reference

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

16.5 Rules and notes

Organization of this section
(1) Rules
(2) Notes
(3) Using files with a BOM

(1) Rules

  1. The optimizing information collection utility (pdgetcst) can be executed only when the HiRDB system is running.
  2. The optimizing information collection utility (pdgetcst) should be executed on a single-server or a server machine with a system manager.
  3. pdgetcst cannot be executed on data dictionary tables, view tables, or temporary tables. If an attempt is made to execute pdgetcst on these items, pdgetcst issues one of the following error messages:
    If optimizing information was saved in units of tables:
    pdgetcst issues the KFPN00014-I message and terminates normally, because the optimizing information cannot be collected or registered.
    If optimizing information was registered or saved in units of schemas:
    pdgetcst issues the KFPN00100-E message and terminates with an error, because executions in units of schemas are not supported.
  4. Columns of abstract data type cannot be specified in an optimizing information parameter file.
  5. The optimizing information collected by pdgetcst becomes available for use during SQL optimization processing.
  6. If the optimization information registered by pdgetcst does not match the actual database status, performance may become poor because the appropriate access path cannot be selected. If you have executed an SQL statement that changes the database status, execute pdgetcst to obtain the database status that matches the optimization information.
  7. If an actual environment and a test environment both exist, make sure that the optimization information matches the actual number of table rows and distribution of data values. When the optimizing information collection level is lvl1, only the number of table rows must match.
  8. To execute pdgetcst, the data dictionary RDAREA must be in shutdown release and open status.
  9. Whether or not pdgetcst is executable on an RDAREA depends on the status of the index storage RDAREA for the table subject to pdgetcst processing. For details, see Appendix C. RDAREA Status During Command Execution.
  10. For the output results file and parameter file that contains optimized information, you need to grant access privileges to the HiRDB administrator beforehand.
  11. You must set the LANG environment variable in order to execute pdgetcst. You must set the PDLANG environment variable in order to use in the pdgetcst execution environment a character encoding that is not supported by the OS. For details about LANG and PDLANG, see the manual HiRDB Version 9 UAP Development Guide.

(2) Notes

  1. The following are the pdgetcst utility's return codes:
    0: Normal termination
    4: Warning termination (warning occurred concerning data dictionary table manipulation)
    8: Abnormal termination
  2. Do not change definitions of the target table or index when the optimizing information collection utility is being executed; if definitions are changed, the optimizing information collection utility may produce spurious results.
  3. Inserting or deleting rows or updating data in the target table or index when the optimizing information collection utility is running can produce errors in the resulting optimizing information.
  4. The optimizing information collection utility should be run when a table contains actual data. Correct cost information cannot be obtained if the optimizing information collection utility is executed on a table that does not contain any data, for example, immediately after the table was defined.
  5. If the character encoding in the character strings coded in the optimizing information parameter file is different from the character encoding used in the HiRDB system, the results of the optimizing information collection utility cannot be guaranteed.
  6. Do not execute multiple instances of pdgetcst simultaneously for the same table. If multiple instances of pdgetcst are executed simultaneously for the same table, HiRDB operation is not guaranteed. If multiple instances of pdgetcst are executed simultaneously to register optimizing information into data dictionary tables, the KFPN00013-I message indicating the end of processing is issued, but the optimum access paths might not be obtained.
  7. If the optimizing information collection utility terminates with an error, the results of its operation cannot be guaranteed. If this happens, resolve the error by referencing any error messages that were output and rerun the optimizing information collection utility. If the error reoccurs when pdgetcst is re-executed, see If an error occurs while registering, updating, or deleting optimizing information in the HiRDB Version 9 System Operation Guide, and take the appropriate action.
  8. When pdgetcst is executed, the access procedure changes. If the actual data characteristics do not match the optimizing information, there may be adverse effects on the performance. Therefore, conduct a thorough test before executing pdgetcst.
  9. If there are a test environment and a real environment, and optimizing information is to be collected in the real environment, make sure that both environments have the same number of data items and the same distribution of data values so that the same optimizing information is obtained as for the test environment.

(3) Using files with a BOM

If you selected utf-8 or utf-8_ivs as the character encoding in the pdsetup command, you can use a file with a BOM as the optimization information parameter file for pdgetcst. Note that even when a file with a BOM is used as the optimization information parameter file, the BOM is skipped. No BOM is included in the file that is output by pdgetcst.