You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
2406
-
1 SIMPLE t1 NULL index PRIMARY PRIMARY 66 NULL 11 100.00 Using index
2406
+
1 SIMPLE t1 NULL index PRIMARY PRIMARY 258 NULL 11 100.00 Using index
2407
2407
Warnings:
2408
2408
Note 1003 /* select#1 */ select distinct `test`.`t1`.`a` AS `a`,`test`.`t1`.`a` AS `a` from `test`.`t1` order by `test`.`t1`.`a`
2409
2409
SELECT DISTINCT a,a FROM t1 ORDER BY a;
@@ -3605,7 +3605,7 @@ CREATE TABLE t1 (
3605
3605
f1 int(11) NOT NULL DEFAULT '0',
3606
3606
f2 char(1) NOT NULL DEFAULT '',
3607
3607
PRIMARY KEY (f1,f2)
3608
-
) ;
3608
+
) charset utf8mb4;
3609
3609
insert into t1 values(1,'A'),(1 , 'B'), (1, 'C'), (2, 'A'),
3610
3610
(3, 'A'), (3, 'B'), (3, 'C'), (3, 'D');
3611
3611
SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
@@ -3615,7 +3615,7 @@ f1 COUNT(DISTINCT f2)
3615
3615
3 4
3616
3616
explain SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
3617
3617
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
3618
-
1 SIMPLE t1 NULL range PRIMARY PRIMARY 5 NULL 9 100.00 Using index for group-by (scanning)
3618
+
1 SIMPLE t1 NULL range PRIMARY PRIMARY 8 NULL 9 100.00 Using index for group-by (scanning)
3619
3619
Warnings:
3620
3620
Note 1003 /* select#1 */ select `test`.`t1`.`f1` AS `f1`,count(distinct `test`.`t1`.`f2`) AS `COUNT(DISTINCT f2)` from `test`.`t1` group by `test`.`t1`.`f1`
0 commit comments