Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

SET ENVIRONMENT

The SET ENVIRONMENT statement can specify options at runtime that affect subsequent queries submitted within the same routine. This is an extension to the ANSI/ISO standard for SQL. Only Dynamic Server supports the OPTCOMPIND option. All of the other options are valid only with Extended Parallel Server.

Syntax

Read syntax diagramSkip visual syntax diagram>>-SET ENVIRONMENT---------------------------------------------->
 
      (1)
>--+--------+-BOUND_IMPL_PDQ-+--+-----------+----------------------+-><
   |        +-COMPUTE_QUOTA--+  +-ON--------+                      |
   |        +-CLIENT_TZ------+  +-OFF-------+                      |
   |        +-IMPLICIT_PDQ---+  +-'value'---+                      |
   |        +-MAXSCAN--------+  +-DEFAULT---+                      |
   |        '-TMPSPACE_LIMIT-'  +-MUTABLE---+                      |
   |                            '-IMMUTABLE-'                      |
   |    (1)                                                        |
   '-+--------+-TEMP_TAB_EXT_SIZE--+-+--+-DEFAULT----------------+-'
     |        '-TEMP_TAB_NEXT_SIZE-' |  +-'integer '-------------+
     |            (2)                |  |                 (1)    |
     '-OPTCOMPIND--------------------'  '---+-MUTABLE---+--------'
                                            '-IMMUTABLE-'
 
Notes:
  1. Extended Parallel Server only
  2. Dynamic Server only
Element Description Restrictions Syntax
value Value to set for the specified environment option, which this statement also enables Must be valid for the specified environment option Quoted String, p. Quoted String
integer The extent size for system-generated temporary tables, in kilobytes (XPS).
The code 0, 1, or 2 to prioritize nested-loop joins as an optimizer strategy (IDS).
Same as for value Quoted String, p. Quoted String

Usage

SET ENVIRONMENT specifies environment options that manage resource use by the routine in which the statement is executed. For example, on Extended Parallel Server, the SET ENVIRONMENT IMPLICIT_PDQ ON statement enables automatic PDQPRIORITY allocation for queries submitted in the routine.

The OFF keyword disables the specified option.

The ON keyword enables the specified option.

The DEFAULT keyword sets the specified option to its default value.

The MUTABLE keyword makes the specified option modifiable during a user session.

The IMMUTABLE keyword prevents modification of the specified option during a user session.

The arguments that follow the option name depend on the syntax of the option. The option name and its ON, OFF, and DEFAULT keywords are not quoted and are not case sensitive. All other arguments must be enclosed between single ( ' ) or double ( " ) quotation marks. If a quoted string is a valid argument for an environment option, the argument is case sensitive.

If you enter an undefined option name or an invalid value for a defined option, no error is returned. Undefined options are ignored, but they might produce unexpected results, if you intended some effect that a misspelled or unsupported option name cannot produce. The SET ENVIRONMENT statement can enable only the environment options that are described in sections that follow.

For information about the performance implications of the SET ENVIRONMENT options, refer to the IBM Informix Performance Guide.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]