DROP TABLE IF EXISTS ids;
CREATE TABLE items (
id int PRIMARY KEY,
color VARCHAR(16) NOT NULL,
INDEX (color)
) COMMENT='ENGINE "InnoDB"' DEFAULT CHARSET=utf8mb4;
INSERT INTO items VALUES (1, 'red');
INSERT INTO items VALUES (2, 'blue');
INSERT INTO items VALUES (3, 'green');
EXPLAIN SELECT DISTINCT color FROM items;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	items	range	NULL	color	66	NULL	3	Using index for group-by
DROP TABLE items;
