DROP TABLE IF EXISTS ids;
SET NAMES UTF8MB4;
CREATE TABLE ids (
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
value INT,
INDEX (value)
) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4;
INSERT INTO ids VALUES(1, 50);
INSERT INTO ids VALUES(2, 70);
INSERT INTO ids VALUES(3, 30);
INSERT INTO ids VALUES(4, 90);
INSERT INTO ids VALUES(5, 10);
SELECT id, value FROM ids WHERE value >= 30 ORDER BY value ASC LIMIT 3;
id	value
3	30
1	50
2	70
DROP TABLE ids;
