OPT_GOAL environment variable (UNIX)

Set the OPT_GOAL environment variable in the user environment, before you start an application, to specify the query performance goal for the optimizer.

1  setenv OPT_GOAL
2.1 0
2.1! -1
Specifies user-response-time optimization.
Specifies total-query-time optimization.

The default behavior is for the optimizer to use query plans that optimize the total query time.

You can also specify the optimization goal for individual queries with optimizer directives or for a session with the SET OPTIMIZATION statement.

Both methods take precedence over the OPT_GOAL environment variable setting. You can also set the OPT_GOAL configuration parameter for the HCL OneDB™ system; this method has the lowest level of precedence.

For more information about optimizing queries for your database server, see your HCL OneDB Performance Guide. For information about the SET OPTIMIZATION statement, see the HCL OneDB Guide to SQL: Syntax.