FLATTEN_SUBQUERIES option

Function

Enables the transformation of some simple correlated EXISTS and NOT EXISTS subqueries into equivalent join-based queries.

Allowed values

ON, OFF

Default

OFF

Scope

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

Description

Use only if instructed to do so by Sybase Technical Support. This option enables the transformation of some simple correlated EXISTS and NOT EXISTS subqueries into equivalent join-based queries. In most cases in which the optimizer can apply this transformation, the query runs faster with the transformation than without the transformation applied. There are some exceptions to this performance improvement and some queries might run more slowly, so be sure that use of this option is appropriate for your environment.