Nonstop Database, HiRDB Version 9 UAP Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
(1) Locations where SQL optimization can be specified
(a) SQL optimization specifications
SQL optimization specifications can be specified in the following SQL statements:
- Subqueries
- Table expressions
- DELETE statement
- UPDATE statement
(b) SQL optimization options and SQL extension optimizing options
SQL optimization options and SQL extension optimizing options can be specified at the following locations. Normally, you would specify this options in the system common definitions, so that the options will be valid for all SQL statements.
- pd_optimize_level, pd_additional_optimize_level operand of the system common definitions
- pd_optimize_level, pd_additional_optimize_level operand of the front-end server definitions
- PDSQLOPTLVL, PDADDITIONALOPTLVL of the client environment definitions
- SQL compile option (procedure body of ALTER PROCEDURE, ALTER ROUTINE, ALTER TRIGGER, CREATE PROCEDURE, CREATE TRIGGER and CREATE TYPE)
The priority when SQL optimization options and SQL extension optimizing options are specified in several locations is as follows. If SQL optimization specifications are specified in SQL statements, they have priority over SQL optimization options and SQL extension optimizing options.
(a) Data manipulation SQL statements in locations other than stored routines and triggers
The priority is as follows:
- PDSQLOPTLVL and PDADDITIONALOPTLVL of the client environment definitions
- pd_optimize_level and pd_additional_optimize_level operands of the front-end server definitions
- pd_optimize_level and pd_additional_optimize_level operands of the system common definitions
(b) Data manipulation SQL statements in stored routines and in triggers
The priority is as follows:
- SQL command options (procedure body of ALTER PROCEDURE, ALTER ROUTINE, ALTER TRIGGER, CREATE PROCEDURE, CREATE TRIGGER and CREATE TYPE)
- pd_optimize_level and pd_additional_optimize_level operands of the front-end server definitions
- pd_optimize_level and pd_additional_optimize_level operands of the system common definitions
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.