~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/subselect.result

  • Committer: Brian Aker
  • Date: 2010-09-20 00:00:20 UTC
  • Revision ID: brian@tangent.org-20100920000020-s6x30brpajr83pkr
Update session/memory to use boost specific.

Show diffs side-by-side

added added

removed removed

Lines of Context:
393
393
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
394
394
EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
395
395
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
396
 
1       SIMPLE  t1      index   NULL    PRIMARY 154     NULL    2       100.00  Using where; Using index
 
396
1       SIMPLE  t1      index   NULL    PRIMARY 153     NULL    2       100.00  Using where; Using index
397
397
Warnings:
398
398
Note    1003    select distinct `test`.`t1`.`date` AS `date` from `test`.`t1` where (`test`.`t1`.`date` = '2002-08-03')
399
399
EXPLAIN EXTENDED SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03');
400
400
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
401
401
1       PRIMARY NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    No tables used
402
 
2       SUBQUERY        t1      index   NULL    PRIMARY 154     NULL    2       100.00  Using where; Using index
 
402
2       SUBQUERY        t1      index   NULL    PRIMARY 153     NULL    2       100.00  Using where; Using index
403
403
Warnings:
404
404
Note    1003    select (select distinct `test`.`t1`.`date` AS `date` from `test`.`t1` where (`test`.`t1`.`date` = '2002-08-03')) AS `(SELECT DISTINCT date FROM t1 WHERE date='2002-08-03')`
405
405
SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
2889
2889
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2890
2890
1       PRIMARY t1      const   PRIMARY PRIMARY 4       const   1       Using index
2891
2891
1       PRIMARY r       const   PRIMARY PRIMARY 4       const   1       
2892
 
2       DEPENDENT SUBQUERY      t2      ref     b       b       5               3       Using where; Using index
 
2892
2       DEPENDENT SUBQUERY      t2      ref     b       b       5               1       Using where; Using index
2893
2893
SELECT t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r 
2894
2894
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' 
2895
2895
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;