~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/distinct.result

  • Committer: Brian Aker
  • Date: 2008-07-20 09:02:20 UTC
  • Revision ID: brian@tangent.org-20080720090220-bhrg1wemfnzutbgi
Convert default engine to Innodb

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
175
175
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
176
176
1       SIMPLE  t1      ALL     PRIMARY NULL    NULL    NULL    4       Using temporary
177
 
1       SIMPLE  t3      ref     a       a       5       test.t1.b       2       Using index
178
 
1       SIMPLE  t2      index   a       a       4       NULL    5       Using where; Using index; Distinct; Using join buffer
 
177
1       SIMPLE  t2      ref     a       a       4       test.t1.a       1       Using index
 
178
1       SIMPLE  t3      ref     a       a       5       test.t1.b       1       Using index
179
179
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
180
180
a
181
181
1
190
190
explain select distinct t1.a from t1,t3 where t1.a=t3.a;
191
191
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
192
192
1       SIMPLE  t1      index   PRIMARY PRIMARY 4       NULL    4       Using index; Using temporary
193
 
1       SIMPLE  t3      ref     a       a       5       test.t1.a       11      Using index; Distinct
 
193
1       SIMPLE  t3      ref     a       a       5       test.t1.a       1       Using index; Distinct
194
194
select distinct t1.a from t1,t3 where t1.a=t3.a;
195
195
a
196
196
1
212
212
1       SIMPLE  t1      index   NULL    PRIMARY 4       NULL    1       Using index
213
213
explain SELECT distinct a from t3 order by a desc limit 2;
214
214
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
215
 
1       SIMPLE  t3      index   NULL    a       5       NULL    40      Using index
 
215
1       SIMPLE  t3      index   NULL    a       5       NULL    2       Using index
216
216
explain SELECT distinct a,b from t3 order by a+1;
217
217
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
218
218
1       SIMPLE  t3      ALL     NULL    NULL    NULL    NULL    204     Using temporary; Using filesort
219
219
explain SELECT distinct a,b from t3 order by a limit 2;
220
220
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
221
 
1       SIMPLE  t3      index   NULL    a       5       NULL    2       Using temporary
 
221
1       SIMPLE  t3      ALL     NULL    NULL    NULL    NULL    204     Using temporary; Using filesort
222
222
explain SELECT a,b from t3 group by a,b order by a+1;
223
223
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
224
224
1       SIMPLE  t3      ALL     NULL    NULL    NULL    NULL    204     Using temporary; Using filesort
519
519
EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2
520
520
WHERE t1_1.a = t1_2.a;
521
521
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
522
 
1       SIMPLE  t1_1    ALL     PRIMARY NULL    NULL    NULL    3       Using temporary
523
 
1       SIMPLE  t1_2    eq_ref  PRIMARY PRIMARY 4       test.t1_1.a     1       Using index; Distinct
 
522
1       SIMPLE  t1_2    index   PRIMARY PRIMARY 4       NULL    3       Using index; Using temporary
 
523
1       SIMPLE  t1_1    ALL     PRIMARY NULL    NULL    NULL    3       Using where; Using join buffer
524
524
EXPLAIN SELECT a FROM t1 GROUP BY a;
525
525
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
526
526
1       SIMPLE  t1      index   NULL    PRIMARY 4       NULL    3       Using index