I see the default value for this variable is 62 (i.e. exhaustive search
for the best query plan, as we allow maximum ~64 tables in a join). It's
so in 5.0, 5.1, 6.0-codebase.
I remember Timour explaining that indeed beyond 7 tables, exhaustive
search becomes very costly.
--optimizer-search-depth=0, documented as "make a reasonable choice",
chooses min(number of tables, 7) (see determine_search_depth() in
Why is exhaustive (62) the default? I guess most users use the default
(naturally), which is why choosing a good default is important...
Does anyone have an idea or some background about this default?
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
www.sun.com / www.mysql.com