IFX_EXTDIRECTIVES environment variable

The IFX_EXTDIRECTIVES environment variable specifies whether the query optimizer allows external query optimization directives from the sysdirectives system catalog table to be applied to queries in existing applications.

You have two options for setting the IFX_EXTDIRECTIVES environment variable:

  • Global, for all users:

    On the server, set IFX_EXTDIRECTIVES in the environment as user informix and then run the oninit command.

  • Client specific:

    On the client, set IFX_EXTDIRECTIVES in the environment. When IFX_EXTDIRECTIVES is set in the client environment, the client setting are used regardless of the server (global) setting.

You can determine the server setting using the onstat -g env command.

You can specify either ON and OFF or 1 and 0 to set the environment variable.

1  setenv IFX_DIRECTIVES
2.1 1
2.1 0
1
External optimizer directives accepted
0
External optimizer directives not accepted

Queries within a given client application can use external directives if both the EXT_DIRECTIVES parameter in the configuration file of the database server and the IFX_EXTDIRECTIVES environment variable setting on the client system are both set to 1 or ON. If IFX_EXTDIRECTIVES is not set, external directives are supported only if the ONCONFIG parameter EXT_DIRECTIVES is set to 2. The following table summarizes the effect of valid IFX_EXTDIRECTIVES and EXT_DIRECTIVES settings on support for external optimizer directives.

Table 1. Effect of IFX_EXTDIRECTIVES and EXT_DIRECTIVES settings on external directives
EXT_DIRECTIVES = 0 EXT_DIRECTIVES = 1 EXT_DIRECTIVES = 2
IFX_EXTDIRECTIVES No setting OFF OFF ON
IFX_EXTDIRECTIVES0 = OFF OFF OFF OFF
IFX_EXTDIRECTIVES1 = ON OFF ON ON
The database server interprets any EXT_DIRECTIVES setting besides 1 or 2 (or no setting) as equivalent to OFF, disabling support for external directives. Any value of IFX_EXTDIRECTIVES other than 1 has the same effect for the client.

For information about how to define external optimizer directives, see the description of the SAVE EXTERNAL DIRECTIVES statement of SQL in the HCL OneDB™ Guide to SQL: Syntax. For more information about the EXT_DIRECTIVES configuration parameter, see the HCL OneDB Administrator's Reference. For more information about the performance impact of directives, see your HCL OneDB Performance Guide.