Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

4.5.3 Specifying SQL optimization

Organization of this subsection
(1) Locations where SQL optimization can be specified
(2) Priority

(1) Locations where SQL optimization can be specified

(a) SQL optimization specifications

SQL optimization specifications can be specified in the following SQL statements:

(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.

(2) Priority

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:

  1. PDSQLOPTLVL and PDADDITIONALOPTLVL of the client environment definitions
  2. pd_optimize_level and pd_additional_optimize_level operands of the front-end server definitions
  3. 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:

  1. SQL command options (procedure body of ALTER PROCEDURE, ALTER ROUTINE, ALTER TRIGGER, CREATE PROCEDURE, CREATE TRIGGER and CREATE TYPE)
  2. pd_optimize_level and pd_additional_optimize_level operands of the front-end server definitions
  3. pd_optimize_level and pd_additional_optimize_level operands of the system common definitions