~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/haildb/tests/r/basic_index_lookup.result

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
create table t1 (a int primary key);
2
 
insert into t1 values (1),(2),(3),(4),(100),(200);
3
 
explain select * from t1 order by a;
4
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
5
 
1       SIMPLE  t1      index   NULL    PRIMARY 4       NULL    #       Using index
6
 
select * from t1 order by a;
7
 
a
8
 
1
9
 
2
10
 
3
11
 
4
12
 
100
13
 
200
14
 
explain select * from t1 where a>4;
15
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
16
 
1       SIMPLE  t1      index   PRIMARY PRIMARY 4       NULL    #       Using where; Using index
17
 
select * from t1 where a>4;
18
 
a
19
 
100
20
 
200
21
 
explain select * from t1 where a<4;
22
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
23
 
1       SIMPLE  t1      index   PRIMARY PRIMARY 4       NULL    #       Using where; Using index
24
 
select * from t1 where a<4;
25
 
a
26
 
1
27
 
2
28
 
3
29
 
explain select * from t1 where a=4;
30
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
31
 
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   #       Using index
32
 
select * from t1 where a=4;
33
 
a
34
 
4
35
 
drop table t1;
36
 
create table t1 (a int primary key, b varchar(100));
37
 
insert into t1 values (1, "hello"), (2, "world"), (3, "Beaker"), (4, "Cricket");
38
 
EXPLAIN SELECT b FROM t1 WHERE a=1;
39
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
40
 
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   #       
41
 
SELECT b FROM t1 WHERE a=1;
42
 
b
43
 
hello
44
 
EXPLAIN SELECT b FROM t1 WHERE a=2;
45
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
46
 
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   #       
47
 
SELECT b FROM t1 WHERE a=2;
48
 
b
49
 
world
50
 
EXPLAIN SELECT b FROM t1 WHERE a=3;
51
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
52
 
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   #       
53
 
SELECT b FROM t1 WHERE a=3;
54
 
b
55
 
Beaker
56
 
EXPLAIN SELECT b FROM t1 WHERE a=4;
57
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
58
 
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   #       
59
 
SELECT b FROM t1 WHERE a=4;
60
 
b
61
 
Cricket
62
 
DROP TABLE t1;