Hi Ole John,
Ok to push with Olav's corrections.
Regards, Evgen.
On 01/25/2011 03:41 PM, Ole John Aske wrote:
> #At file:///net/fimafeng09/export/home/tmp/oleja/mysql/mysql-trunk/ based on
> revid:georgi.kodinov@stripped
>
> 3548 Ole John Aske 2011-01-25
> Extend greedy_optimizer.test creating a new baseline before commiting fix for
> bug#59326.
>
> Test has been enhanced to both explain the optimized query plan *and*
> execute it and report total number of 'Handler_reads%' during
> execution.
>
> Handler_reads is believed to be a fairly good metric on how optimal the
> query plan was.
>
> added:
> mysql-test/include/execute_with_statistics.inc
> modified:
> mysql-test/r/greedy_optimizer.result
> mysql-test/t/greedy_optimizer.test
> === added file 'mysql-test/include/execute_with_statistics.inc'
> --- a/mysql-test/include/execute_with_statistics.inc 1970-01-01 00:00:00 +0000
> +++ b/mysql-test/include/execute_with_statistics.inc 2011-01-25 12:41:38 +0000
> @@ -0,0 +1,8 @@
> +eval EXPLAIN $query;
> +show status like 'Last_query_cost';
> +
> +flush status;
> +eval $query;
> +select sum(variable_value) as Total_handler_reads
> + from information_schema.session_status
> + where VARIABLE_NAME like 'Handler_read%';
>
> === modified file 'mysql-test/r/greedy_optimizer.result'
> --- a/mysql-test/r/greedy_optimizer.result 2010-11-29 13:30:18 +0000
> +++ b/mysql-test/r/greedy_optimizer.result 2011-01-25 12:41:38 +0000
> @@ -122,7 +122,7 @@ set optimizer_search_depth=0;
> select @@optimizer_search_depth;
> @@optimizer_search_depth
> 0
> -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;
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -134,7 +134,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -146,7 +157,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer (BNL, incremental
> buffers)
> @@ -158,7 +180,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.430791
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +1338
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer (BNL, incremental
> buffers)
> @@ -170,7 +203,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.430791
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +1338
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -182,7 +226,15 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.469776
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +20
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -194,11 +246,19 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.469776
> +flush status;
> +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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +20
> set optimizer_search_depth=1;
> select @@optimizer_search_depth;
> @@optimizer_search_depth
> 1
> -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;
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -210,7 +270,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 822.001607
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -222,7 +293,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 822.001607
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
> @@ -234,7 +316,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.014136
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
> @@ -246,7 +339,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.014136
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
> @@ -258,7 +362,15 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.340548
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +6
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
> @@ -270,11 +382,19 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.340548
> +flush status;
> +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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +6
> set optimizer_search_depth=62;
> select @@optimizer_search_depth;
> @@optimizer_search_depth
> 62
> -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;
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -286,7 +406,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -298,7 +429,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer (BNL, incremental
> buffers)
> @@ -310,7 +452,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.430791
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +1338
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer (BNL, incremental
> buffers)
> @@ -322,7 +475,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.430791
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +1338
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -334,7 +498,15 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.469776
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +20
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
> 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -346,6 +518,14 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 289.469776
> +flush status;
> +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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +20
> set optimizer_prune_level=1;
> select @@optimizer_prune_level;
> @@optimizer_prune_level
> @@ -354,7 +534,7 @@ set optimizer_search_depth=0;
> select @@optimizer_search_depth;
> @@optimizer_search_depth
> 0
> -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;
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -366,7 +546,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -378,7 +569,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -390,7 +592,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 794.968437
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -402,7 +615,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 794.968437
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -414,7 +638,15 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.085394
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +24
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -426,11 +658,19 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.085394
> +flush status;
> +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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +24
> set optimizer_search_depth=1;
> select @@optimizer_search_depth;
> @@optimizer_search_depth
> 1
> -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;
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -442,7 +682,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 822.001607
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -454,7 +705,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 822.001607
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
> @@ -466,7 +728,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.014136
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
> @@ -478,7 +751,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.014136
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
> @@ -490,7 +774,15 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.340548
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +6
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
> @@ -502,11 +794,19 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.340548
> +flush status;
> +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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +6
> set optimizer_search_depth=62;
> select @@optimizer_search_depth;
> @@optimizer_search_depth
> 62
> -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;
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -518,7 +818,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -530,7 +841,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 821.936459
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -542,7 +864,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 794.968437
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -554,7 +887,18 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 794.968437
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +flush status;
> +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;
> +c11
> +1
> +2
> +3
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +46
> +EXPLAIN select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -566,7 +910,15 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.085394
> -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;
> +flush status;
> +select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +24
> +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;
> id select_type table type possible_keys key key_len ref rows Extra
> 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using where
> 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (BNL,
> incremental buffers)
> @@ -578,6 +930,14 @@ id select_type table type possible_keys
> show status like 'Last_query_cost';
> Variable_name Value
> Last_query_cost 795.085394
> +flush status;
> +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;
> +c11
> +select sum(variable_value) as Total_handler_reads
> +from information_schema.session_status
> +where VARIABLE_NAME like 'Handler_read%';
> +Total_handler_reads
> +24
> drop table t1,t2,t3,t4,t5,t6,t7;
> CREATE TABLE t1 (a int, b int, d int, i int);
> INSERT INTO t1 VALUES (1,1,1,1);
>
> === modified file 'mysql-test/t/greedy_optimizer.test'
> --- a/mysql-test/t/greedy_optimizer.test 2010-05-26 06:07:10 +0000
> +++ b/mysql-test/t/greedy_optimizer.test 2011-01-25 12:41:38 +0000
> @@ -169,58 +169,92 @@ 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;
> -show status like 'Last_query_cost';
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> -show status like 'Last_query_cost';
> -# 6-table join, star
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> -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;
> -show status like 'Last_query_cost';
> -# 6-table join, clique
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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';
> -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';
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, star
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, clique
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
>
> 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;
> -show status like 'Last_query_cost';
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> -show status like 'Last_query_cost';
> -# 6-table join, star
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> -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;
> -show status like 'Last_query_cost';
> -# 6-table join, clique
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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';
> -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';
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, star
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, clique
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
>
> 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;
> -show status like 'Last_query_cost';
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> -show status like 'Last_query_cost';
> -# 6-table join, star
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> -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;
> -show status like 'Last_query_cost';
> -# 6-table join, clique
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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';
> -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';
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, star
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, clique
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
>
>
> set optimizer_prune_level=1;
> @@ -230,58 +264,91 @@ 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;
> -show status like 'Last_query_cost';
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> -show status like 'Last_query_cost';
> -# 6-table join, star
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> -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;
> -show status like 'Last_query_cost';
> -# 6-table join, clique
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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';
> -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';
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, star
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, clique
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
>
> 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;
> -show status like 'Last_query_cost';
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> -show status like 'Last_query_cost';
> -# 6-table join, star
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> -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;
> -show status like 'Last_query_cost';
> -# 6-table join, clique
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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';
> -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';
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, star
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, clique
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
>
> 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;
> -show status like 'Last_query_cost';
> -explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> -show status like 'Last_query_cost';
> -# 6-table join, star
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> -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;
> -show status like 'Last_query_cost';
> -# 6-table join, clique
> -explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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';
> -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';
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + select t1.c11 from t7, t6, t5, t4, t3, t2, t1 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, star
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
> +
> +# 6-table join, clique
> +let $query=
> + select t1.c11 from t1, t2, t3, t4, t5, t6, t7 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;
> +--source include/execute_with_statistics.inc
> +
> +let $query=
> + 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;
> +--source include/execute_with_statistics.inc
>
> drop table t1,t2,t3,t4,t5,t6,t7;
>
>
>
>
>