DROP TABLE IF EXISTS scores;
SET NAMES UTF8;
CREATE TABLE scores (
id BIGINT(20) PRIMARY KEY AUTO_INCREMENT NOT NULL,
name CHAR(30) NOT NULL,
score INT NOT NULL,
KEY property (name, score)
) DEFAULT CHARSET=UTF8;
SHOW CREATE TABLE scores;
Table	Create Table
scores	CREATE TABLE `scores` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` char(30) NOT NULL,
  `score` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `property` (`name`,`score`)
) ENGINE=mroonga DEFAULT CHARSET=utf8
INSERT INTO scores (name, score) VALUES("Taro Yamada", 29);
INSERT INTO scores (name, score) VALUES("Taro Yamada", -12);
INSERT INTO scores (name, score) VALUES("Jiro Yamada", 27);
INSERT INTO scores (name, score) VALUES("Taro Yamada", 10);
SELECT * FROM scores
WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29);
id	name	score
2	Taro Yamada	-12
4	Taro Yamada	10
ALTER TABLE scores DROP KEY property;
SELECT * FROM scores
WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29);
id	name	score
2	Taro Yamada	-12
4	Taro Yamada	10
DROP TABLE scores;
