summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
authorunknown <timour@mysql.com>2004-04-16 13:21:08 +0300
committerunknown <timour@mysql.com>2004-04-16 13:21:08 +0300
commit4c56ede41c6d8148063df723e701281a860ce48e (patch)
tree91b90e1956c2035488a4d2b8c7d9dc45e5bc4127 /sql/structs.h
parent8468cde4f1e028b380c24d0bac28402678568d81 (diff)
downloadmariadb-git-4c56ede41c6d8148063df723e701281a860ce48e.tar.gz
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
Diffstat (limited to 'sql/structs.h')
-rw-r--r--sql/structs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/structs.h b/sql/structs.h
index 37208e63400..3279428c888 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -156,8 +156,8 @@ typedef struct st_known_date_time_format {
enum SHOW_TYPE
{
SHOW_UNDEF,
- SHOW_LONG, SHOW_LONGLONG, SHOW_INT, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_BOOL,
- SHOW_MY_BOOL, SHOW_OPENTABLES, SHOW_STARTTIME, SHOW_QUESTION,
+ SHOW_LONG, SHOW_LONGLONG, SHOW_INT, SHOW_CHAR, SHOW_CHAR_PTR, SHOW_DOUBLE,
+ SHOW_BOOL, SHOW_MY_BOOL, SHOW_OPENTABLES, SHOW_STARTTIME, SHOW_QUESTION,
SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE, SHOW_SYS, SHOW_HA_ROWS,
#ifdef HAVE_OPENSSL
SHOW_SSL_CTX_SESS_ACCEPT, SHOW_SSL_CTX_SESS_ACCEPT_GOOD,