108
106
insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
109
107
explain select * from t1 where btn like "q%";
110
108
select * from t1 where btn like "q%";
111
alter table t1 add column new_col char(1) default "Y" not null, add key using HASH (btn,new_col), drop key btn;
109
alter table t1 add column new_col char(1) not null, add key using HASH (btn,new_col), drop key btn;
112
110
update t1 set new_col=left(btn,1);
113
111
explain select * from t1 where btn="a";
114
112
explain select * from t1 where btn="a" and new_col="a";