← Back to team overview

maria-developers team mailing list archive

@@optimizer_search_depth default value - why 62 and not 0?

 

Hi Timour,

Me and Stephane were discussing a performance issue, and are wondering - why
does the @@optimizer_search_depth has a value of 62?

There is a vale of optimizer_search_depth=0 which tells the optimizer to chose
depth automatically (exhaustive if less than 7 tables, greedy search if more
than that).  This value looks like it was intended to be the default.

Yet, currently the default (in both MariaDB and MySQL) is 62, which tells the 
optimizer use the "new" (as in "new in 5.1") greedy search code, but sets the 
depth so high that it uses exhaustive search. Is there any reason behind this? 

BR
 Sergei
--

Sergei Petrunia, Software Developer
MariaDB | Skype: sergefp | Blog: http://s.petrunia.net/blog