EARLY_PREDICATE_EXECUTION option

Function

Controls whether simple local predicates are executed before query optimization.

Allowed values

ON or OFF

Default

ON

Scope

DBA permissions are not required to set this option. Can be set temporary for an individual connection or for the PUBLIC group. Takes effect immediately.

Description

If this option is ON (the default), the optimizer finds, prepares, and executes predicates containing only local columns and constraints before query optimization, including join ordering, join algorithm selection, and grouping algorithm selection, so that the values of “Estimated Result Rows” in the query plan are more precise. If this option is OFF, the optimizer finds and prepares the simple predicates, but does not execute them before query optimization. The resulting values of “Estimated Result Rows” are less precise, if the predicates are not executed.

In general, the EARLY_PREDICATE_EXECUTION option should always be left ON, as this results in improved query plans for many queries.

Note that when the EARLY_PREDICATE_EXECUTION option is ON, Sybase IQ executes the local predicates for all queries before generating a query plan, even when the NOEXEC option is ON. The generated query plan is the same as the runtime plan.

Query plan root node information – The following information is included in the query plan for the root node:

Query plan leaf node information – The simple predicates whose execution is controlled by this option are referred to as invariant predicates in the query plan.The following information is included in the query plan for a leaf node, if there are any local invariant predicates on the node: