Entering content frame

 JOIN_SEARCH_LEVEL 

The special database parameter JOIN_SEARCH_LEVEL specifies the algorithm for the join sequence search, which itself determines how long the search takes and how many resources it uses.

You can specify the algorithm directly or it can be calculated from the parameters JOIN_MAXTAB_LEVEL4 and JOIN_MAXTAB_LEVEL9, and the number of tables in the join.

To specify the algorithm directly, enter one of the following values for JOIN_SEARCH_LEVEL:

·        9: All possible join sequences are calculated (permutation algorithm).

·        4: Various join sequences are calculated, depending on the query structure (transformer algorithm).

·        1: The simplest algorithm is used for the join sequence search (greedy algorithm).

If you enter 0 as the JOIN_SEARCH_LEVEL, then the algorithm for the join sequence search is specified as follows:

Table Number n of the Join

Algorithm for the Join Sequence Search

£ JOIN_MAXTAB_LEVEL9

9

JOIN_MAXTAB_LEVEL9 <n £ JOIN_MAXTAB_LEVEL4

4

JOIN_MAXTAB_LEVEL4 < n

1

JOIN_SEARCH_LEVEL is set to 0.

JOIN_MAXTAB_LEVEL4 is set to 16.

JOIN_MAXTAB_LEVEL9 is set to 4.

Five tables are used for a join.

Join sequence search level 4 (transformer algorithm) is used for this join because JOIN_MAXTAB_LEVEL9 < 5 = JOIN_MAXTAB_LEVEL4 applies.

For information on the way the Optimizer works, see the documentation SQL Optimizer.

 

Leaving content frame