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. Columns of abstract data type cannot be specified in an optimizing information parameter file.
  4. Only B-tree indexes can be specified in an optimizing information parameter file; plug-in indexes cannot be specified.
  5. Optimizing information cannot be collected by searching tables for repetition columns, except for -c lvl1.
  6. The optimizing information collected by pdgetcst becomes available for use during SQL optimization processing.
  7. 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.
  8. 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.
  9. To execute pdgetcst, the data dictionary RDAREA must be in shutdown release and open status.
  10. 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.
  11. For the output results file and parameter file that contains optimized information, you need to grant access privileges to the HiRDB administrator beforehand.
  12. 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 8 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 use the collection (-d option not specified) and the deletion (-d option specified) of optimizing information simultaneously on the same table. If these options are specified simultaneously, the results of the operation of the optimizing information collection utility cannot be guaranteed.
  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.
  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 as the character encoding in the pdsetup command, you may be able to 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.