Commit bdb0b692 authored by Sinisa@sinisa.nasamreza.org's avatar Sinisa@sinisa.nasamreza.org

Merge sinisa@work.mysql.com:/home/bk/mysql-4.1

into sinisa.nasamreza.org:/mnt/work/mysql-4.1
parents 8c3cf6ad f3d3d288
......@@ -68,13 +68,16 @@ explain select * from t1 where a in (869751,736494,226312,802616);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 where used; Using index
drop table t1;
create table t1 (x int not null, y int not null, key x using BTREE (x), unique y using BTREE (y))
create table t1 (x int not null, y int not null, key x using BTREE (x,y), unique y using BTREE (y))
type=heap;
insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6);
explain select * from t1 where x=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref x x 4 const 1 where used
select * from t1 where x=1;
x y
1 3
1 1
1 3
select * from t1,t1 as t2 where t1.x=t2.y;
x y x y
1 1 1 1
......
......@@ -42,9 +42,10 @@ alter table t1 type=myisam;
explain select * from t1 where a in (869751,736494,226312,802616);
drop table t1;
create table t1 (x int not null, y int not null, key x using BTREE (x), unique y using BTREE (y))
create table t1 (x int not null, y int not null, key x using BTREE (x,y), unique y using BTREE (y))
type=heap;
insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6);
explain select * from t1 where x=1;
select * from t1 where x=1;
select * from t1,t1 as t2 where t1.x=t2.y;
explain select * from t1,t1 as t2 where t1.x=t2.y;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment