Remove it++ On Aug 16, 2009, at 9:53 AM, Padraig O'Sullivan wrote:
Hi! I have a quick question on some code I am thinking of removing that I'd like to get some opinions on. At the moment, there are 2 functions in the optimizer in Drizzle for searching for an optimal query plan: - find_best - greedy_search The method that is used is determined by the optimizer_search_depth parameter. We can see this from the following code: if (search_depth == MAX_TABLES+2) { /*TODO: 'MAX_TABLES+2' denotes the old implementation of find_best beforethe greedy version. Will be removed when greedy_search is approved. */ join->best_read= DBL_MAX; if (find_best(join, join_tables, join->const_tables, 1.0, 0.0)) return(true); } else { if (search_depth == 0) /* Automatically determine a reasonable value for 'search_depth' */ search_depth= determine_search_depth(join); if (greedy_search(join, join_tables, search_depth, prune_level)) return(true); } Currently, in drizzle, optimizer_search_depth is set to 62 by default so we never actually use the find_best method for searching for an optimal plan. Thus, I'm wondering if anyone has any objections to removing the find_best method? That way, we only have 1 method for searching through query plans. From looking at the comments in the optimizer source code, it seems that find_best will be removed from the MySQL source in the future also (if it has not already?) -Padraig _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

