From: Guilhem Bichot Date: January 12 2010 9:31am Subject: why is the default of --optimizer_search_depth 62? List-Archive: http://lists.mysql.com/internals/37631 Message-Id: <4B4C4184.5090809@sun.com> MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII; format=flowed Content-Transfer-Encoding: 7BIT 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 Sun Microsystems / MySQL, Lead Software Engineer Bordeaux, France www.sun.com / www.mysql.com