summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-11-02 13:48:41 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-11-02 13:48:41 +0400
commit47861a657762feeb45ee6b8edea00033bbd0e8ca (patch)
tree060d07487e32539e3edc12f1b5122969d112c6d6 /sql
parent64986873252e6c4fff867407d1b2f92abe24ca88 (diff)
downloadmariadb-git-47861a657762feeb45ee6b8edea00033bbd0e8ca.tar.gz
Change the default @@optimizer_switch settings:
- semijoin=on - firstmatch=on - loosescan=on
Diffstat (limited to 'sql')
-rw-r--r--sql/mysql_priv.h5
-rw-r--r--sql/mysqld.cc6
2 files changed, 7 insertions, 4 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 302a8af7dd3..ac8b3663647 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -609,7 +609,10 @@ enabled by default, add OPTIMIZER_SWITCH_MATERIALIZATION
OPTIMIZER_SWITCH_JOIN_CACHE_INCREMENTAL | \
OPTIMIZER_SWITCH_JOIN_CACHE_HASHED | \
OPTIMIZER_SWITCH_JOIN_CACHE_BKA | \
- OPTIMIZER_SWITCH_SUBQUERY_CACHE)
+ OPTIMIZER_SWITCH_SUBQUERY_CACHE |\
+ OPTIMIZER_SWITCH_SEMIJOIN | \
+ OPTIMIZER_SWITCH_FIRSTMATCH | \
+ OPTIMIZER_SWITCH_LOOSE_SCAN )
/*
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index a7199a4af2a..854bc0b0c78 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -484,11 +484,11 @@ static const char *optimizer_switch_str="index_merge=on,index_merge_union=on,"
"index_condition_pushdown=off,"
"derived_merge=off,"
"derived_with_keys=off,"
- "firstmatch=off,"
- "loosescan=off,"
+ "firstmatch=on,"
+ "loosescan=on,"
"materialization=off,"
"in_to_exists=on,"
- "semijoin=off,"
+ "semijoin=on,"
"partial_match_rowid_merge=on,"
"partial_match_table_scan=on,"
"subquery_cache=on,"