Spec-Zone .ru
спецификации, руководства, описания, API

8.13.16. Subquery Optimization

8.13.16.1. Optimizing Subqueries with Semi-Join Transformations
8.13.16.2. Optimizing Subqueries with Subquery Materialization
8.13.16.3. Optimizing Subqueries in the FROM Clause (DerivedTables)
8.13.16.4. Optimizing Subqueries with EXISTS Strategy

The MySQL query optimizer has different strategies available to evaluate subqueries. For IN (or =ANY) subqueries, the optimizer has these choices:

For NOT IN (or <>ANY) subqueries, the optimizer has these choices:

The following sections provide more information about these optimization strategies.