WL#5252: Deprecate --optimizer_search_depth=63
Affects: Server-5.5
—
Status: Complete
Deprecate the specific value 63 for the variable optimizer_search_depth. According to Server PT decision as of 2010-02-10, the value will be deprecated in release 5.5, and eventually removed in the next major release after that.
Deprecate the specific value 63 for optimizer_search_depth, which enables the old optimizer behavior. choose_plan() will in this case call find_best() and not greedy_search(). The documentation for choose_plan() contains the following note: "'MAX_TABLES+2' denotes the old implementation of find_best before the greedy version. Will be removed when greedy_search is approved." greedy_search() has been in the code base since 5.0, so it is about time to deprecate this feature now. Using this value is documented in the help code for the optimizer_search_depth variable. It is also documented in the user manual: "If set to the maximum number of tables used in a query plus 2, the optimizer switches to the algorithm used in MySQL 5.0.0 (and previous versions) for performing searches", but this paragraph is slightly confusing (is it referring to the maximum number of tables that can be used, or the number of tables being used, and what is then this value?). See also mail threads: "Should we remove find_best()?" sent to mysql_dev_optimizer by Øystein Grøvlen at 2009-12-04, and "why is the default of --optimizer_search_depth 62?" sent to internal (http://lists.mysql.com/internals/37631) by Guilhem Bichot at 2010-01-12. Related bug cases: BUG#50052 reports a regression in 6.0, --optimizer_search_depth=63 crashes. We can close this as "will not fix" if we deprecate this behavior in 5.1 and 5.5, and remove it in 6.0 (presuming that 6.0 will be the next major release after 5.5). Related tests: greedy_optimizer - checks query cost for old and greedy cost-based optimizer subselect3 - tests that old optimizer works for semijoin conversion of subquery optimizer_search_depth_basic - Checks legal values for variable Deprecation of server features follow the approved policy at: https:// inside.mysql.com/wiki/DeprecatingServerFeatures Related worklogs: WL#5265: Remove deprecated 5.5 features
Implement deprecation by adding an update function to the system variable optimizer_search_depth and issue a warning (using WARN_DEPRECATED()) when the value 63 is given.
Copyright (c) 2000, 2024, Oracle Corporation and/or its affiliates. All rights reserved.