~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/subselect_mat.result

  • Committer: Lee Bieber
  • Date: 2010-12-03 01:16:19 UTC
  • mfrom: (1819.9.81 update-innobase)
  • Revision ID: kalebral@gmail.com-20101203011619-n6v584rijwdet05b
Merge Stewart - update Innobase plugin based on InnoDB 1.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
82
82
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
83
83
1       PRIMARY t1i     index   NULL    it1i3   70      NULL    #       100.00  Using where; Using index
84
 
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i1   35      NULL    #       40.00   Using where; Using index
 
84
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i1   35      NULL    #       100.00  Using where; Using index
85
85
Warnings:
86
86
Note    1003    select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <in_optimizer>(`test`.`t1i`.`a1`,`test`.`t1i`.`a1` in ( <materialize> (select `test`.`t2i`.`b1` AS `b1` from `test`.`t2i` where (`test`.`t2i`.`b1` > '0') ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key)))
87
87
select * from t1i where a1 in (select b1 from t2i where b1 > '0');
92
92
select * from t1i where a1 in (select b1 from t2i where b1 > '0' group by b1);
93
93
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
94
94
1       PRIMARY t1i     index   NULL    it1i3   70      NULL    #       100.00  Using where; Using index
95
 
2       SUBQUERY        t2i     range   it2i1,it2i3     it2i1   35      NULL    #       100.00  Using where; Using index for group-by
 
95
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i1   35      NULL    #       100.00  Using where; Using index
96
96
Warnings:
97
97
Note    1003    select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <in_optimizer>(`test`.`t1i`.`a1`,`test`.`t1i`.`a1` in ( <materialize> (select `test`.`t2i`.`b1` AS `b1` from `test`.`t2i` where (`test`.`t2i`.`b1` > '0') group by `test`.`t2i`.`b1` ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key)))
98
98
select * from t1i where a1 in (select b1 from t2i where b1 > '0' group by b1);
103
103
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
104
104
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
105
105
1       PRIMARY t1i     index   NULL    it1i3   70      NULL    #       100.00  Using where; Using index
106
 
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i3   70      NULL    #       40.00   Using where; Using index
 
106
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i3   70      NULL    #       100.00  Using where; Using index
107
107
Warnings:
108
108
Note    1003    select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b1` > '0') ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key)))
109
109
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0');
114
114
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0' group by b1, b2);
115
115
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
116
116
1       PRIMARY t1i     index   NULL    it1i3   70      NULL    #       100.00  Using where; Using index
117
 
2       SUBQUERY        t2i     range   it2i1,it2i3     it2i3   70      NULL    #       100.00  Using where; Using index for group-by
 
117
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i3   70      NULL    #       100.00  Using where; Using index
118
118
Warnings:
119
119
Note    1003    select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b1` > '0') group by `test`.`t2i`.`b1`,`test`.`t2i`.`b2` ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key)))
120
120
select * from t1i where (a1, a2) in (select b1, b2 from t2i where b1 > '0' group by b1, b2);
125
125
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
126
126
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
127
127
1       PRIMARY t1i     index   NULL    it1i3   70      NULL    #       100.00  Using where; Using index
128
 
2       SUBQUERY        t2i     range   it2i1,it2i3     it2i3   70      NULL    #       100.00  Using where; Using index for group-by
 
128
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i1   35      NULL    #       100.00  Using where
129
129
Warnings:
130
130
Note    1003    select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where <in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,min(`test`.`t2i`.`b2`) AS `min(b2)` from `test`.`t2i` where (`test`.`t2i`.`b1` > '0') group by `test`.`t2i`.`b1` ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key)))
131
131
select * from t1i where (a1, a2) in (select b1, min(b2) from t2i where b1 > '0' group by b1);
162
162
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
163
163
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
164
164
3       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
165
 
4       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
 
165
4       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
166
166
2       SUBQUERY        t2      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
167
167
Warnings:
168
168
Note    1003    select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where (<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (select `test`.`t2`.`b1` AS `b1`,`test`.`t2`.`b2` AS `b2` from `test`.`t2` where (`test`.`t2`.`b1` > '0') ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key))) and <in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (select `test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t3` where <in_optimizer>((`test`.`t3`.`c1`,`test`.`t3`.`c2`),(`test`.`t3`.`c1`,`test`.`t3`.`c2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b2` > '0') ), <primary_index_lookup>(`test`.`t3`.`c1` in <temporary table> on distinct_key))) ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key))))
181
181
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
182
182
1       PRIMARY t1i     index   NULL    it1i3   70      NULL    #       100.00  Using where; Using index
183
183
3       SUBQUERY        t3i     index   NULL    it3i3   70      NULL    #       100.00  Using where; Using index
184
 
4       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
185
 
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i3   70      NULL    #       40.00   Using where; Using index
 
184
4       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
 
185
2       SUBQUERY        t2i     index   it2i1,it2i3     it2i3   70      NULL    #       100.00  Using where; Using index
186
186
Warnings:
187
187
Note    1003    select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where (<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b1` > '0') ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key))) and <in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (select `test`.`t3i`.`c1` AS `c1`,`test`.`t3i`.`c2` AS `c2` from `test`.`t3i` where <in_optimizer>((`test`.`t3i`.`c1`,`test`.`t3i`.`c2`),(`test`.`t3i`.`c1`,`test`.`t3i`.`c2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b2` > '0') ), <primary_index_lookup>(`test`.`t3i`.`c1` in <temporary table> on distinct_key))) ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key))))
188
188
select * from t1i
202
202
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
203
203
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
204
204
5       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
205
 
6       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
 
205
6       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
206
206
2       SUBQUERY        t2      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
207
207
4       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
208
208
3       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
226
226
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
227
227
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
228
228
5       SUBQUERY        t3c     ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
229
 
6       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
 
229
6       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
230
230
2       DEPENDENT SUBQUERY      t2      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
231
231
4       SUBQUERY        t3b     ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
232
232
3       DEPENDENT SUBQUERY      t3a     ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
258
258
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
259
259
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
260
260
5       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
261
 
6       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
 
261
6       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
262
262
2       SUBQUERY        t2      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where; Using temporary; Using filesort
263
263
4       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
264
264
3       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
265
265
7       UNION   t1i     index   NULL    it1i3   70      NULL    #       100.00  Using where; Using index
266
266
9       SUBQUERY        t3i     index   NULL    it3i3   70      NULL    #       100.00  Using where; Using index
267
 
10      SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
268
 
8       SUBQUERY        t2i     index   it2i1,it2i3     it2i3   70      NULL    #       40.00   Using where; Using index
 
267
10      SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
 
268
8       SUBQUERY        t2i     index   it2i1,it2i3     it2i3   70      NULL    #       100.00  Using where; Using index
269
269
NULL    UNION RESULT    <union1,7>      ALL     NULL    NULL    NULL    NULL    #       NULL    
270
270
Warnings:
271
271
Note    1003    (select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where (<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (select `test`.`t2`.`b1` AS `b1`,`test`.`t2`.`b2` AS `b2` from `test`.`t2` where (<in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (select `test`.`t3`.`c2` AS `c2` from `test`.`t3` where (`test`.`t3`.`c2` like '%02') ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key))) or <in_optimizer>(`test`.`t2`.`b2`,`test`.`t2`.`b2` in ( <materialize> (select `test`.`t3`.`c2` AS `c2` from `test`.`t3` where (`test`.`t3`.`c2` like '%03') ), <primary_index_lookup>(`test`.`t2`.`b2` in <temporary table> on distinct_key)))) group by `test`.`t2`.`b1`,`test`.`t2`.`b2` ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key))) and <in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),(`test`.`t1`.`a1`,`test`.`t1`.`a2`) in ( <materialize> (select `test`.`t3`.`c1` AS `c1`,`test`.`t3`.`c2` AS `c2` from `test`.`t3` where <in_optimizer>((`test`.`t3`.`c1`,`test`.`t3`.`c2`),(`test`.`t3`.`c1`,`test`.`t3`.`c2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b2` > '0') ), <primary_index_lookup>(`test`.`t3`.`c1` in <temporary table> on distinct_key))) ), <primary_index_lookup>(`test`.`t1`.`a1` in <temporary table> on distinct_key))))) union (select `test`.`t1i`.`a1` AS `a1`,`test`.`t1i`.`a2` AS `a2` from `test`.`t1i` where (<in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b1` > '0') ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key))) and <in_optimizer>((`test`.`t1i`.`a1`,`test`.`t1i`.`a2`),(`test`.`t1i`.`a1`,`test`.`t1i`.`a2`) in ( <materialize> (select `test`.`t3i`.`c1` AS `c1`,`test`.`t3i`.`c2` AS `c2` from `test`.`t3i` where <in_optimizer>((`test`.`t3i`.`c1`,`test`.`t3i`.`c2`),(`test`.`t3i`.`c1`,`test`.`t3i`.`c2`) in ( <materialize> (select `test`.`t2i`.`b1` AS `b1`,`test`.`t2i`.`b2` AS `b2` from `test`.`t2i` where (`test`.`t2i`.`b2` > '0') ), <primary_index_lookup>(`test`.`t3i`.`c1` in <temporary table> on distinct_key))) ), <primary_index_lookup>(`test`.`t1i`.`a1` in <temporary table> on distinct_key)))))
292
292
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
293
293
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
294
294
4       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
295
 
5       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
 
295
5       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
296
296
2       DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
297
297
3       DEPENDENT UNION t2      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
298
298
NULL    UNION RESULT    <union2,3>      ALL     NULL    NULL    NULL    NULL    #       NULL    
315
315
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
316
316
1       PRIMARY t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where; Using join buffer
317
317
4       SUBQUERY        t3      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
318
 
5       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       40.00   Using where; Using index
 
318
5       SUBQUERY        t2i     index   it2i2   it2i3   70      NULL    #       100.00  Using where; Using index
319
319
2       DEPENDENT SUBQUERY      t1      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
320
320
3       DEPENDENT UNION t2      ALL     NULL    NULL    NULL    NULL    #       100.00  Using where
321
321
NULL    UNION RESULT    <union2,3>      ALL     NULL    NULL    NULL    NULL    #       NULL