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
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
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
129
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
130
show status like 'Last_query_cost';
132
Last_query_cost 822.625316
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
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
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
141
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
142
show status like 'Last_query_cost';
144
Last_query_cost 822.625316
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
149
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
150
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
151
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
152
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
153
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
154
show status like 'Last_query_cost';
156
Last_query_cost 795.625316
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
161
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
162
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
163
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
164
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
165
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
166
show status like 'Last_query_cost';
168
Last_query_cost 795.625316
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
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
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
177
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
178
show status like 'Last_query_cost';
180
Last_query_cost 795.625316
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
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
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
189
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
190
show status like 'Last_query_cost';
192
Last_query_cost 795.625316
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
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
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
209
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
210
show status like 'Last_query_cost';
212
Last_query_cost 822.625316
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
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
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
221
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
222
show status like 'Last_query_cost';
224
Last_query_cost 822.625316
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 SIMPLE t2 ALL NULL NULL NULL NULL 6
228
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
229
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
230
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
231
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
232
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
233
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
234
show status like 'Last_query_cost';
236
Last_query_cost 275.146368
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 t2 ALL NULL NULL NULL NULL 6
240
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
241
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
242
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
243
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
244
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
245
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
246
show status like 'Last_query_cost';
248
Last_query_cost 275.146368
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 t2 ALL NULL NULL NULL NULL 6
252
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
253
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
254
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
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
257
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
258
show status like 'Last_query_cost';
260
Last_query_cost 275.146368
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
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
269
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
270
show status like 'Last_query_cost';
272
Last_query_cost 275.146368
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
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
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
285
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
286
show status like 'Last_query_cost';
288
Last_query_cost 822.625316
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
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
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
297
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
298
show status like 'Last_query_cost';
300
Last_query_cost 822.625316
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 t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
305
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
306
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
307
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
308
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
309
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
310
show status like 'Last_query_cost';
312
Last_query_cost 795.625316
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 Using index
317
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
318
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
319
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
320
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
321
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
322
show status like 'Last_query_cost';
324
Last_query_cost 795.625316
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 t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1
329
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where
330
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
331
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
332
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
333
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
334
show status like 'Last_query_cost';
336
Last_query_cost 795.625316
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
344
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
345
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
346
show status like 'Last_query_cost';
348
Last_query_cost 795.625316
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
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
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
361
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
362
show status like 'Last_query_cost';
364
Last_query_cost 822.625316
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
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
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
373
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
374
show status like 'Last_query_cost';
376
Last_query_cost 822.625316
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 t2 ALL NULL NULL NULL NULL 6
380
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
381
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
382
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
383
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
384
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
385
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
386
show status like 'Last_query_cost';
388
Last_query_cost 275.146368
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 t2 ALL NULL NULL NULL NULL 6
392
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
393
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
394
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
395
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
396
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
397
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
398
show status like 'Last_query_cost';
400
Last_query_cost 275.146368
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 t2 ALL NULL NULL NULL NULL 6
404
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
405
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
406
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
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
409
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
410
show status like 'Last_query_cost';
412
Last_query_cost 275.146368
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 t2 ALL NULL NULL NULL NULL 6
416
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
417
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where
418
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where
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
421
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
422
show status like 'Last_query_cost';
424
Last_query_cost 275.146368
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
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
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
441
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
442
show status like 'Last_query_cost';
444
Last_query_cost 822.625316
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
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
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
453
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
454
show status like 'Last_query_cost';
456
Last_query_cost 822.625316
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
461
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
462
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
463
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
464
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
465
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
466
show status like 'Last_query_cost';
468
Last_query_cost 795.625316
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
473
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
474
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
475
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
476
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
477
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
478
show status like 'Last_query_cost';
480
Last_query_cost 795.625316
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
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
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
489
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
490
show status like 'Last_query_cost';
492
Last_query_cost 795.625316
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
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
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
501
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
502
show status like 'Last_query_cost';
504
Last_query_cost 795.625316
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
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
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
517
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
518
show status like 'Last_query_cost';
520
Last_query_cost 822.625316
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
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
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
529
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
530
show status like 'Last_query_cost';
532
Last_query_cost 822.625316
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 Using index
537
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
538
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
539
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
540
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
541
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
542
show status like 'Last_query_cost';
544
Last_query_cost 795.625316
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 Using index
549
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
550
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
551
1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where
552
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
553
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
554
show status like 'Last_query_cost';
556
Last_query_cost 795.625316
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
564
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
565
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
566
show status like 'Last_query_cost';
568
Last_query_cost 795.625316
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
576
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
577
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
578
show status like 'Last_query_cost';
580
Last_query_cost 795.625316
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
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
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
593
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
594
show status like 'Last_query_cost';
596
Last_query_cost 822.625316
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
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
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
605
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
606
show status like 'Last_query_cost';
608
Last_query_cost 822.625316
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
613
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
614
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
615
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
616
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
617
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
618
show status like 'Last_query_cost';
620
Last_query_cost 795.625316
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
625
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index
626
1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where
627
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index
628
1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where
629
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
630
show status like 'Last_query_cost';
632
Last_query_cost 795.625316
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
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
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
641
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
642
show status like 'Last_query_cost';
644
Last_query_cost 795.625316
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
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
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
653
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
654
show status like 'Last_query_cost';
656
Last_query_cost 795.625316
657
drop table t1,t2,t3,t4,t5,t6,t7;