Library /sys$common/syshlp/HELPLIB.HLB  —  SQLMOD72  SQLMOD Command Line, Arguments  OPTIMIZATION_LEVEL
    Specifies the optimizer strategy to be used to process all
    queries within your SQL module language program. Select the:

    o  AGGRESSIVE_SELECTIVITY option if you expect a small number of
       rows to be selected.

    o  DEFAULT option to accept the Oracle Rdb defaults: FAST_FIRST
       and DEFAULT SELECTIVITY. strategy.

    o  FAST_FIRST option if you want your program to return data to
       the user as quickly as possible, even at the expense of total
       throughput.

    o  SAMPLED_SELECTIVITY option to use literals in the query to
       perform preliminary estimation on indices.

    o  TOTAL_TIME option if you want your program to run at the
       fastest possible rate, returning all the data as quickly as
       possible. If your application runs in batch, accesses all the
       records in a query, and performs updates or writes reports,
       you should specify TOTAL_TIME.

    You can select either the TOTAL_TIME or the FAST_FIRST option in
    conjunction with either the AGGRESSIVE_SELECTIVITY or SAMPLED_
    SELECTIVITY option. Use a comma to separate the keywords and
    enclosed the list in parentheses.

    The following example shows how to use the OPTIMIZATION_LEVEL
    qualifier:

    $ SQL$MOD/OPTIMIZATION_LEVEL=(TOTAL_TIME,SAMPLED_SELECTIVITY) APPCODE.SQLMOD

    Any query that explicitly includes an OPTIMIZE WITH, or OPTIMIZE_
    FOR clause is not affected by the settings established using the
    OPTIMIZATION_LEVEL qualifier.

    You affect the optimizer strategy of static SQL queries with the
    optimization level qualifier; however, the default optimizer
    strategy set by the OPTIMIZATION_LEVEL qualifier can be
    overridden by the default optimizer strategy set in a top-level
    SELECT statement.

    In contrast, the SET OPTIMIZATION LEVEL statement specifies the
    query optimization level for dynamic SQL query compilation only;
    the statement does not affect the SQL compile-time environment
    nor does it affect the run-time environment of static queries.
Close Help