summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test/mroonga/storage/r/optimization_order_limit_optimized_datetime_between.result
blob: f1cc14b4963634269130fc10c5e570d243897604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
DROP TABLE IF EXISTS diaries;
FLUSH STATUS;
SET NAMES UTF8;
CREATE TABLE diaries (
id INT UNSIGNED NOT NULL,
date DATETIME,
content TEXT,
FULLTEXT INDEX(content),
KEY(date)
) DEFAULT CHARSET UTF8;
INSERT INTO diaries VALUES(1, "2011-11-11 12:23:30", "Today is fine.");
INSERT INTO diaries VALUES(2, "2011-11-11 12:23:31", "Today's lucky item is flower!");
INSERT INTO diaries VALUES(3, "2011-11-11 12:23:32", "I will do something today!");
INSERT INTO diaries VALUES(4, "2011-11-11 12:23:33", "I don't want to anything today...");
INSERT INTO diaries VALUES(5, "2011-11-11 12:23:34", "I'm sleepy today.");
SELECT * FROM diaries
WHERE MATCH(content) AGAINST("today" IN BOOLEAN MODE) AND
date BETWEEN "2011-11-11 12:23:31" AND "2011-11-11 12:23:33"
         ORDER BY id LIMIT 1,2;
id	date	content
3	2011-11-11 12:23:32	I will do something today!
4	2011-11-11 12:23:33	I don't want to anything today...
SHOW STATUS LIKE 'mroonga_fast_order_limit';
Variable_name	Value
Mroonga_fast_order_limit	1
DROP TABLE diaries;