1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Implementation of WL#1469 (Greedy algorithm to search for an optimal execution plan).

mysql-test/r/subselect.result:
  Table pre-sorting before optimization makes the optimizer select a different plan, this change fixes the plan.
sql/mysql_priv.h:
  Added new status variable last_query_cost that contains the cost of the last compiled query.
sql/mysqld.cc:
  * Added new system variable 'plan_search_depth' to control the exhaustiveness of the search for an optimal query plan.
  * Added new system variable 'heuristic' to control the use of query optimization heuristic.
  * Added new status variable 'last_query_cost' that contains the cost of the last compiled query.
sql/set_var.cc:
  * Added new system variable 'plan_search_depth' to control the exhaustiveness of the search for an optimal query plan.
  * Added new system variable 'heuristic' to control the use of query optimization heuristic.
sql/sql_class.h:
  * Added new system variable 'plan_search_depth' to control the exhaustiveness of the search for an optimal query plan.
  * Added new system variable 'heuristic' to control the use of query optimization heuristic.
sql/sql_select.cc:
  Added a combined greedy/exhaustive query optimization algorithm.
  * The greedy search algorithm is implemented in function 'greedy_search'.
  * The exhaustive search with controlled search depth is implemented in function 'find_best_limited_depth', a modification of 'find_best'.
  * The selection of the best access path and its cost computation is factored out from 'find_best' into function 'best_access_path'.
  * In addition:
    - added pre-sorting for the query tables before they get optimized
    - factored out the optimization of STRAIGHT_JOIN into a separate procedure
sql/sql_select.h:
  Added new field to st_position to support the greedy optimizer.
  Added a comment to class JOIN.
sql/sql_show.cc:
  Added a case to 'mysqld_show' to print double status variables.
sql/structs.h:
  Added a new type of status variables SHOW_DOUBLE
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
This commit is contained in:
unknown
2004-04-16 13:21:08 +03:00
parent 8468cde4f1
commit 4c56ede41c
12 changed files with 1966 additions and 11 deletions

View File

@@ -1831,6 +1831,11 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
end= strend(pos);
break;
}
case SHOW_DOUBLE:
{
end= buff + sprintf(buff, "%f", *(double*) value);
break;
}
#ifdef HAVE_OPENSSL
/* First group - functions relying on CTX */
case SHOW_SSL_CTX_SESS_ACCEPT: