Improved Subquery Performance

Use SUBQUERY_FLATTENING_PREFERENCE and SUBQUERY_FLATTENING_PERCENT to control subquery flattening.

Subquery flattening is an optimization technique in which the optimizer rewrites a query containing a subquery into a query that uses a join. Sybase IQ flattens many but not all subqueries. Use SUBQUERY_FLATTENING_PREFERENCE and SUBQUERY_FLATTENING_PERCENT to control when the optimizer chooses to use this optimization.

The FLATTEN_SUBQUERIES option has been deprecated in Sybase IQ 15.0.

Related concepts
Impact on Query Performance of GROUP BY Over a UNION ALL
Using Caching Methods
Enhancing ORDER BY Query Performance