| 1 |
# |
| 2 |
# Bug #29207450 TINYTEXT COLUMN TAKES LONG TIME IN THE GROUP BY OPERATION. |
| 3 |
# |
| 4 |
create table t1 (id serial primary key auto_increment,a varchar(100),b varchar(100)); |
| 5 |
create table t2 (id serial primary key auto_increment,a varchar(100),b tinytext); |
| 6 |
insert into t1 (a, b) values('a', '746d847beb7e'),('a','746d847beb7e'),('a', '746d847beb7e'),('a','746d847beb7e'),('a','746d847beb7e'); |
| 7 |
insert into t1 (a, b) select 'a', '746d847beb7e' from t1 t1,t1 t2,t1 t3,t1 t4; |
| 8 |
insert into t1 (a, b) select 'a', '746d847beb7e' from t1 t1,t1 t2; |
| 9 |
insert into t1 (a, b) select 'a', '746d847beb7e' from t1; |
| 10 |
insert into t2 (a, b) values('a', '746d847beb7e'),('a','746d847beb7e'),('a', '746d847beb7e'),('a','746d847beb7e'),('a','746d847beb7e'); |
| 11 |
insert into t2 (a, b) select 'a', '746d847beb7e' from t2 t1,t2 t2,t2 t3,t2 t4; |
| 12 |
insert into t2 (a, b) select 'a', '746d847beb7e' from t2 t1,t2 t2; |
| 13 |
insert into t2 (a, b) select 'a', '746d847beb7e' from t2; |
| 14 |
select count(*) from t1; |
| 15 |
count(*) |
| 16 |
795060 |
| 17 |
select count(*) from t2; |
| 18 |
count(*) |
| 19 |
795060 |
| 20 |
set big_tables = 1; |
| 21 |
select b, count(*) from t1 group by b; |
| 22 |
b count(*) |
| 23 |
746d847beb7e 795060 |
| 24 |
select b, count(*) from t2 group by b; |
| 25 |
b count(*) |
| 26 |
746d847beb7e 795060 |
| 27 |
set big_tables = 0; |
| 28 |
select b, count(*) from t1 group by b; |
| 29 |
b count(*) |
| 30 |
746d847beb7e 795060 |
| 31 |
select b, count(*) from t2 group by b; |
| 32 |
b count(*) |
| 33 |
746d847beb7e 795060 |
| 34 |
drop table t1, t2; |