13.2.9.10 Optimizing Subqueries

Development is ongoing, so no optimization tip is reliable for the long term. The following list provides some interesting tricks that you might want to play with:

These tricks might cause programs to go faster or slower. Using MySQL facilities like the BENCHMARK() function, you can get an idea about what helps in your own situation. See Section 12.13, “Information Functions”.

Some optimizations that MySQL itself makes are:

See also MySQL Internals: How MySQL Transforms Subqueries.