Nonstop Database, HiRDB Version 9 Command Reference
16.5 Rules and notes
- The optimizing information collection utility (pdgetcst) can be executed only when the HiRDB system is running.
- The optimizing information collection utility (pdgetcst) should be executed on a single-server or a server machine with a system manager.
- 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.
- Columns of abstract data type cannot be specified in an optimizing information parameter file.
- The optimizing information collected by pdgetcst becomes available for use during SQL optimization processing.
- 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.
- 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.
- To execute pdgetcst, the data dictionary RDAREA must be in shutdown release and open status.
- 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.
- For the output results file and parameter file that contains optimized information, you need to grant access privileges to the HiRDB administrator beforehand.
- 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.
- 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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.