drop table if exists orders1_test; Warnings: Note 1051 Unknown table 'test.orders1_test' CREATE TABLE `orders1_test` ( `o_id` int NOT NULL, `o_d_id` tinyint NOT NULL, `o_w_id` smallint NOT NULL, `o_c_id` int DEFAULT NULL, PRIMARY KEY (`o_w_id`,`o_d_id`,`o_id`), KEY `idx_orders1` (`o_w_id`,`o_d_id`,`o_c_id`,`o_id`) ) ENGINE=XEngine DEFAULT CHARSET=utf8mb4; insert into orders1_test values(100,1,3,1),(200,1,3,2),(300,1,3,3),(2000,1,3,7),(2200,1,3,4); explain select o_id from orders1_test force index(idx_orders1) WHERE o_id>2100 and o_w_id=3 limit 1; id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 SIMPLE orders1_test NULL ref idx_orders1 idx_orders1 2 const xxx xxx Using where; Using index Warnings: Note 1003 /* select#1 */ select `test`.`orders1_test`.`o_id` AS `o_id` from `test`.`orders1_test` FORCE INDEX (`idx_orders1`) where ((`test`.`orders1_test`.`o_w_id` = 3) and (`test`.`orders1_test`.`o_id` > 2100)) limit 1 select o_id from orders1_test force index(idx_orders1) WHERE o_id>2100 and o_w_id=3 limit 1; o_id 2200 DROP TABLE orders1_test;