summaryrefslogtreecommitdiff
path: root/mysql-test/t/greedy_optimizer.test
diff options
context:
space:
mode:
authorunknown <timour@mysql.com>2004-05-20 17:47:43 +0300
committerunknown <timour@mysql.com>2004-05-20 17:47:43 +0300
commitbed3bc480ab0ee0cd989b1da34936911a459f589 (patch)
tree54b8fdddf35b64c44cc340c9e98a6dda26ca3a04 /mysql-test/t/greedy_optimizer.test
parentd1b02b37cc5498ef655f5f184fc81d88b50370b1 (diff)
downloadmariadb-git-bed3bc480ab0ee0cd989b1da34936911a459f589.tar.gz
Better names for two system variables:
- heuristic => optimizer_prune_level - plan_search_depth => optimizer_search_depth
Diffstat (limited to 'mysql-test/t/greedy_optimizer.test')
-rw-r--r--mysql-test/t/greedy_optimizer.test54
1 files changed, 27 insertions, 27 deletions
diff --git a/mysql-test/t/greedy_optimizer.test b/mysql-test/t/greedy_optimizer.test
index f488286461b..e547d85b7f3 100644
--- a/mysql-test/t/greedy_optimizer.test
+++ b/mysql-test/t/greedy_optimizer.test
@@ -137,21 +137,21 @@ insert into t7 values (21,2,3,4,5,6);
# Check the default values for the optimizer paramters
-select @@plan_search_depth;
-select @@heuristic;
+select @@optimizer_search_depth;
+select @@optimizer_prune_level;
-- This value swithes back to the old implementation of 'find_best()'
--- set plan_search_depth=63; - old (independent of the heuristic)
+-- set optimizer_search_depth=63; - old (independent of the optimizer_prune_level)
--
-- These are the values for the parameters that control the greedy optimizer
--- (total 6 combinations - 3 for plan_search_depth, 2 for heuristic):
+-- (total 6 combinations - 3 for optimizer_search_depth, 2 for optimizer_prune_level):
--
--- set plan_search_depth=0; - automatic
--- set plan_search_depth=1; - min
--- set plan_search_depth=62; - max (default)
+-- set optimizer_search_depth=0; - automatic
+-- set optimizer_search_depth=1; - min
+-- set optimizer_search_depth=62; - max (default)
--
--- set heuristic=0 - exhaustive;
--- set heuristic=1 - heuristic; -- default
+-- set optimizer_prune_level=0 - exhaustive;
+-- set optimizer_prune_level=1 - heuristic; -- default
#
@@ -167,8 +167,8 @@ select @@heuristic;
# procedure 'find_best'. Notice that 'find_best' does not depend on the
# choice of heuristic.
-set plan_search_depth=63;
-select @@plan_search_depth;
+set optimizer_search_depth=63;
+select @@optimizer_search_depth;
-- 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
@@ -189,11 +189,11 @@ show status like 'Last_query_cost';
# Test the new optimization procedures
-set heuristic=0;
-select @@heuristic;
+set optimizer_prune_level=0;
+select @@optimizer_prune_level;
-set plan_search_depth=0;
-select @@plan_search_depth;
+set optimizer_search_depth=0;
+select @@optimizer_search_depth;
-- 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
@@ -211,8 +211,8 @@ show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
-set plan_search_depth=1;
-select @@plan_search_depth;
+set optimizer_search_depth=1;
+select @@optimizer_search_depth;
-- 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
@@ -230,8 +230,8 @@ show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
-set plan_search_depth=62;
-select @@plan_search_depth;
+set optimizer_search_depth=62;
+select @@optimizer_search_depth;
-- 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
@@ -250,11 +250,11 @@ explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and
show status like 'Last_query_cost';
-set heuristic=1;
-select @@heuristic;
+set optimizer_prune_level=1;
+select @@optimizer_prune_level;
-set plan_search_depth=0;
-select @@plan_search_depth;
+set optimizer_search_depth=0;
+select @@optimizer_search_depth;
-- 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
@@ -272,8 +272,8 @@ show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
-set plan_search_depth=1;
-select @@plan_search_depth;
+set optimizer_search_depth=1;
+select @@optimizer_search_depth;
-- 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
@@ -291,8 +291,8 @@ show status like 'Last_query_cost';
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
show status like 'Last_query_cost';
-set plan_search_depth=62;
-select @@plan_search_depth;
+set optimizer_search_depth=62;
+select @@optimizer_search_depth;
-- 6-table join, chain
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;