Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Other Syntax Segments > Optimizer Directives >

Optimization-Goal Directives (IDS)

Use optimization-goal directives to specify the measure that is used to determine the performance of a query result.

Read syntax diagramSkip visual syntax diagramOptimization-Goal Directives:
 
|--+-ALL_ROWS---+--+----------+---------------------------------|
   '-FIRST_ROWS-'  '-comments-'
 

Element Description Restrictions Syntax
comments Text documenting the directive Must appear between comment symbols Character string

The two optimization-goal directives are:

An optimization-goal directive takes precedence over the OPT_GOAL environment variable setting and over the OPT_GOAL configuration parameter.

For information about how to set the optimization goal for an entire session, see the SET OPTIMIZATION statement.

You cannot use an optimization-goal directive in the following contexts:

The following query returns the names of the employees who earned the top fifty bonuses. The optimization-goal directive directs the optimizer to return the first screenful of rows as fast as possible.

SELECT {+FIRST_ROWS 
   Return the first screenful of rows as fast as possible}
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]