1
drop table if exists t1,t2,t3,t4,t5,t6,t7;
3
c11 integer,c12 integer,c13 integer,c14 integer,c15 integer,c16 integer,
7
c21 integer,c22 integer,c23 integer,c24 integer,c25 integer,c26 integer
10
c31 integer,c32 integer,c33 integer,c34 integer,c35 integer,c36 integer,
14
c41 integer,c42 integer,c43 integer,c44 integer,c45 integer,c46 integer
17
c51 integer,c52 integer,c53 integer,c54 integer,c55 integer,c56 integer,
21
c61 integer,c62 integer,c63 integer,c64 integer,c65 integer,c66 integer
24
c71 integer,c72 integer,c73 integer,c74 integer,c75 integer,c76 integer,
27
insert into t1 values (1,2,3,4,5,6);
28
insert into t1 values (2,2,3,4,5,6);
29
insert into t1 values (3,2,3,4,5,6);
30
insert into t2 values (1,2,3,4,5,6);
31
insert into t2 values (2,2,3,4,5,6);
32
insert into t2 values (3,2,3,4,5,6);
33
insert into t2 values (4,2,3,4,5,6);
34
insert into t2 values (5,2,3,4,5,6);
35
insert into t2 values (6,2,3,4,5,6);
36
insert into t3 values (1,2,3,4,5,6);
37
insert into t3 values (2,2,3,4,5,6);
38
insert into t3 values (3,2,3,4,5,6);
39
insert into t3 values (4,2,3,4,5,6);
40
insert into t3 values (5,2,3,4,5,6);
41
insert into t3 values (6,2,3,4,5,6);
42
insert into t3 values (7,2,3,4,5,6);
43
insert into t3 values (8,2,3,4,5,6);
44
insert into t3 values (9,2,3,4,5,6);
45
insert into t4 values (1,2,3,4,5,6);
46
insert into t4 values (2,2,3,4,5,6);
47
insert into t4 values (3,2,3,4,5,6);
48
insert into t4 values (4,2,3,4,5,6);
49
insert into t4 values (5,2,3,4,5,6);
50
insert into t4 values (6,2,3,4,5,6);
51
insert into t4 values (7,2,3,4,5,6);
52
insert into t4 values (8,2,3,4,5,6);
53
insert into t4 values (9,2,3,4,5,6);
54
insert into t4 values (10,2,3,4,5,6);
55
insert into t4 values (11,2,3,4,5,6);
56
insert into t4 values (12,2,3,4,5,6);
57
insert into t5 values (1,2,3,4,5,6);
58
insert into t5 values (2,2,3,4,5,6);
59
insert into t5 values (3,2,3,4,5,6);
60
insert into t5 values (4,2,3,4,5,6);
61
insert into t5 values (5,2,3,4,5,6);
62
insert into t5 values (6,2,3,4,5,6);
63
insert into t5 values (7,2,3,4,5,6);
64
insert into t5 values (8,2,3,4,5,6);
65
insert into t5 values (9,2,3,4,5,6);
66
insert into t5 values (10,2,3,4,5,6);
67
insert into t5 values (11,2,3,4,5,6);
68
insert into t5 values (12,2,3,4,5,6);
69
insert into t5 values (13,2,3,4,5,6);
70
insert into t5 values (14,2,3,4,5,6);
71
insert into t5 values (15,2,3,4,5,6);
72
insert into t6 values (1,2,3,4,5,6);
73
insert into t6 values (2,2,3,4,5,6);
74
insert into t6 values (3,2,3,4,5,6);
75
insert into t6 values (4,2,3,4,5,6);
76
insert into t6 values (5,2,3,4,5,6);
77
insert into t6 values (6,2,3,4,5,6);
78
insert into t6 values (7,2,3,4,5,6);
79
insert into t6 values (8,2,3,4,5,6);
80
insert into t6 values (9,2,3,4,5,6);
81
insert into t6 values (10,2,3,4,5,6);
82
insert into t6 values (11,2,3,4,5,6);
83
insert into t6 values (12,2,3,4,5,6);
84
insert into t6 values (13,2,3,4,5,6);
85
insert into t6 values (14,2,3,4,5,6);
86
insert into t6 values (15,2,3,4,5,6);
87
insert into t6 values (16,2,3,4,5,6);
88
insert into t6 values (17,2,3,4,5,6);
89
insert into t6 values (18,2,3,4,5,6);
90
insert into t7 values (1,2,3,4,5,6);
91
insert into t7 values (2,2,3,4,5,6);
92
insert into t7 values (3,2,3,4,5,6);
93
insert into t7 values (4,2,3,4,5,6);
94
insert into t7 values (5,2,3,4,5,6);
95
insert into t7 values (6,2,3,4,5,6);
96
insert into t7 values (7,2,3,4,5,6);
97
insert into t7 values (8,2,3,4,5,6);
98
insert into t7 values (9,2,3,4,5,6);
99
insert into t7 values (10,2,3,4,5,6);
100
insert into t7 values (11,2,3,4,5,6);
101
insert into t7 values (12,2,3,4,5,6);
102
insert into t7 values (13,2,3,4,5,6);
103
insert into t7 values (14,2,3,4,5,6);
104
insert into t7 values (15,2,3,4,5,6);
105
insert into t7 values (16,2,3,4,5,6);
106
insert into t7 values (17,2,3,4,5,6);
107
insert into t7 values (18,2,3,4,5,6);
108
insert into t7 values (19,2,3,4,5,6);
109
insert into t7 values (20,2,3,4,5,6);
110
insert into t7 values (21,2,3,4,5,6);
111
select @@optimizer_search_depth;
112
@@optimizer_search_depth
114
select @@optimizer_prune_level;
115
@@optimizer_prune_level
117
set optimizer_search_depth=63;
118
select @@optimizer_search_depth;
119
@@optimizer_search_depth
121
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;
122
id select_type table type possible_keys key key_len ref rows Extra
123
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
124
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
125
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
126
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
127
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
128
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
129
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
130
show status like 'Last_query_cost';
133
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;
134
id select_type table type possible_keys key key_len ref rows Extra
135
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
136
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
137
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
138
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
139
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
140
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
141
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
142
show status like 'Last_query_cost';
145
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;
146
id select_type table type possible_keys key key_len ref rows Extra
147
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
148
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
149
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
150
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
151
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
152
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
153
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
154
show status like 'Last_query_cost';
157
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;
158
id select_type table type possible_keys key key_len ref rows Extra
159
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
160
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
161
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
162
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
163
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
164
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
165
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
166
show status like 'Last_query_cost';
169
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;
170
id select_type table type possible_keys key key_len ref rows Extra
171
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
172
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
173
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
174
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
175
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
176
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
177
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
178
show status like 'Last_query_cost';
181
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;
182
id select_type table type possible_keys key key_len ref rows Extra
183
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
184
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
185
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
186
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
187
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
188
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
189
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
190
show status like 'Last_query_cost';
193
set optimizer_prune_level=0;
194
select @@optimizer_prune_level;
195
@@optimizer_prune_level
197
set optimizer_search_depth=0;
198
select @@optimizer_search_depth;
199
@@optimizer_search_depth
201
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;
202
id select_type table type possible_keys key key_len ref rows Extra
203
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
204
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
205
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
206
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
207
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
208
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
209
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
210
show status like 'Last_query_cost';
213
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;
214
id select_type table type possible_keys key key_len ref rows Extra
215
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
216
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
217
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
218
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
219
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
220
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
221
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
222
show status like 'Last_query_cost';
225
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;
226
id select_type table type possible_keys key key_len ref rows Extra
227
1 # t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
228
1 # t2 ALL NULL NULL NULL NULL 6
229
1 # t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
230
1 # t4 ALL NULL NULL NULL NULL 12 Using join buffer
231
1 # t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
232
1 # t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
233
1 # t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
234
show status like 'Last_query_cost';
237
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;
238
id select_type table type possible_keys key key_len ref rows Extra
239
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
240
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
241
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
242
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer
243
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
244
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
245
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
246
show status like 'Last_query_cost';
249
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;
250
id select_type table type possible_keys key key_len ref rows Extra
251
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
252
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
253
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
254
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
255
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
256
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
257
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
258
show status like 'Last_query_cost';
261
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;
262
id select_type table type possible_keys key key_len ref rows Extra
263
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
264
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
265
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
266
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
267
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
268
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
269
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
270
show status like 'Last_query_cost';
273
set optimizer_search_depth=1;
274
select @@optimizer_search_depth;
275
@@optimizer_search_depth
277
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;
278
id select_type table type possible_keys key key_len ref rows Extra
279
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
280
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
281
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
282
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
283
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
284
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
285
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
286
show status like 'Last_query_cost';
289
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;
290
id select_type table type possible_keys key key_len ref rows Extra
291
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
292
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
293
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
294
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
295
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
296
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
297
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
298
show status like 'Last_query_cost';
301
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;
302
id select_type table type possible_keys key key_len ref rows Extra
303
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
304
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
305
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
306
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
307
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
308
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
309
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
310
show status like 'Last_query_cost';
313
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;
314
id select_type table type possible_keys key key_len ref rows Extra
315
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
316
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
317
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
318
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
319
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
320
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
321
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
322
show status like 'Last_query_cost';
325
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;
326
id select_type table type possible_keys key key_len ref rows Extra
327
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
328
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
329
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
330
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
331
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
332
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
333
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
334
show status like 'Last_query_cost';
337
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;
338
id select_type table type possible_keys key key_len ref rows Extra
339
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
340
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
341
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
342
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
343
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
344
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
345
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
346
show status like 'Last_query_cost';
349
set optimizer_search_depth=62;
350
select @@optimizer_search_depth;
351
@@optimizer_search_depth
353
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;
354
id select_type table type possible_keys key key_len ref rows Extra
355
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
356
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
357
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
358
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
359
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
360
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
361
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
362
show status like 'Last_query_cost';
365
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;
366
id select_type table type possible_keys key key_len ref rows Extra
367
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
368
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
369
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
370
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
371
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
372
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
373
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
374
show status like 'Last_query_cost';
377
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;
378
id select_type table type possible_keys key key_len ref rows Extra
379
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
380
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
381
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
382
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer
383
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
384
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
385
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
386
show status like 'Last_query_cost';
389
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;
390
id select_type table type possible_keys key key_len ref rows Extra
391
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
392
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
393
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
394
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer
395
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
396
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
397
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
398
show status like 'Last_query_cost';
401
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;
402
id select_type table type possible_keys key key_len ref rows Extra
403
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
404
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
405
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
406
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
407
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
408
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
409
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
410
show status like 'Last_query_cost';
413
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;
414
id select_type table type possible_keys key key_len ref rows Extra
415
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
416
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
417
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
418
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
419
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
420
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
421
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
422
show status like 'Last_query_cost';
425
set optimizer_prune_level=1;
426
select @@optimizer_prune_level;
427
@@optimizer_prune_level
429
set optimizer_search_depth=0;
430
select @@optimizer_search_depth;
431
@@optimizer_search_depth
433
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;
434
id select_type table type possible_keys key key_len ref rows Extra
435
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
436
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
437
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
438
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
439
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
440
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
441
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
442
show status like 'Last_query_cost';
445
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;
446
id select_type table type possible_keys key key_len ref rows Extra
447
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
448
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
449
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
450
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
451
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
452
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
453
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
454
show status like 'Last_query_cost';
457
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;
458
id select_type table type possible_keys key key_len ref rows Extra
459
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
460
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
461
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
462
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
463
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
464
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
465
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
466
show status like 'Last_query_cost';
469
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;
470
id select_type table type possible_keys key key_len ref rows Extra
471
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
472
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
473
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
474
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
475
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
476
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
477
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
478
show status like 'Last_query_cost';
481
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;
482
id select_type table type possible_keys key key_len ref rows Extra
483
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
484
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
485
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
486
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
487
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
488
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
489
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
490
show status like 'Last_query_cost';
493
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;
494
id select_type table type possible_keys key key_len ref rows Extra
495
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
496
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
497
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
498
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
499
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
500
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
501
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
502
show status like 'Last_query_cost';
505
set optimizer_search_depth=1;
506
select @@optimizer_search_depth;
507
@@optimizer_search_depth
509
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;
510
id select_type table type possible_keys key key_len ref rows Extra
511
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
512
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
513
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
514
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
515
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
516
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
517
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
518
show status like 'Last_query_cost';
521
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;
522
id select_type table type possible_keys key key_len ref rows Extra
523
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
524
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
525
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
526
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
527
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
528
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
529
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
530
show status like 'Last_query_cost';
533
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;
534
id select_type table type possible_keys key key_len ref rows Extra
535
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
536
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
537
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
538
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
539
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
540
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
541
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
542
show status like 'Last_query_cost';
545
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;
546
id select_type table type possible_keys key key_len ref rows Extra
547
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
548
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
549
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
550
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
551
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
552
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
553
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
554
show status like 'Last_query_cost';
557
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;
558
id select_type table type possible_keys key key_len ref rows Extra
559
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
560
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
561
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
562
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
563
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
564
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
565
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
566
show status like 'Last_query_cost';
569
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;
570
id select_type table type possible_keys key key_len ref rows Extra
571
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
572
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
573
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
574
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
575
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
576
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
577
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
578
show status like 'Last_query_cost';
581
set optimizer_search_depth=62;
582
select @@optimizer_search_depth;
583
@@optimizer_search_depth
585
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;
586
id select_type table type possible_keys key key_len ref rows Extra
587
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
588
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
589
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
590
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
591
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
592
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
593
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
594
show status like 'Last_query_cost';
597
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;
598
id select_type table type possible_keys key key_len ref rows Extra
599
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
600
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
601
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1
602
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
603
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1
604
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
605
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1
606
show status like 'Last_query_cost';
609
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;
610
id select_type table type possible_keys key key_len ref rows Extra
611
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
612
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
613
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
614
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
615
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
616
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
617
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
618
show status like 'Last_query_cost';
621
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;
622
id select_type table type possible_keys key key_len ref rows Extra
623
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
624
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
625
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
626
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
627
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1
628
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
629
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1
630
show status like 'Last_query_cost';
633
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;
634
id select_type table type possible_keys key key_len ref rows Extra
635
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
636
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
637
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
638
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
639
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
640
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
641
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
642
show status like 'Last_query_cost';
645
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;
646
id select_type table type possible_keys key key_len ref rows Extra
647
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
648
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer
649
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
650
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer
651
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
652
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer
653
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
654
show status like 'Last_query_cost';
657
drop table t1,t2,t3,t4,t5,t6,t7;