MAX_JOIN_ENUMERATION option

Function

Controls the maximum number of tables to be optimized for join order after optimizer simplifications have been applied.

Allowed values

Integer from 1 to 64

Scope

Can be set temporary, for an individual connection, or for the PUBLIC group. Takes effect immediately.

Default

15

Description

The query optimizer simplifies its optimization of join order by separate handling of both lookup tables (that is, non-selective dimension tables) and tables that are effective cartesian products. After simplification, it proceeds with optimizing the remaining tables for join order, up to the limit set by MAX_JOIN_ENUMERATION. If this limit is exceeded, the query is rejected with an error. The user can then either simplify the query or try increasing the limit.

Normally you should not need to change this value. If you do, Sybase recommends setting MAX_JOIN_ENUMERATION as a temporary or user option.