List:Internals« Previous MessageNext Message »
From:Guilhem Bichot Date:January 12 2010 9:31am
Subject:why is the default of --optimizer_search_depth 62?
View as plain text  
Hello,

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 
sql_select.cc).

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
Bordeaux, France
www.sun.com / www.mysql.com
Thread
why is the default of --optimizer_search_depth 62?Guilhem Bichot12 Jan
  • why is the default of --optimizer_search_depth 62?Michael Widenius12 Jan
  • Re: why is the default of --optimizer_search_depth 62?Timour Katchaounov12 Jan