EXPLAIN actual ascending nibble query to get MySQL's chosen index, and use that instead of the tool's chosen index. TODO: fix OobNibbleIterator.t and chunk_index.t.

This commit is contained in:
Daniel Nichter
2012-05-04 17:46:34 -06:00
parent 69b7a6b6a5
commit e2073065b1
5 changed files with 196 additions and 44 deletions

View File

@@ -0,0 +1,20 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
CREATE TABLE `multi_resource_apt` (
`apt_id` int(10) unsigned NOT NULL DEFAULT '0',
`res_id` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`apt_id`,`res_id`),
KEY `resid` (`res_id`)
) ENGINE=InnoDB;
INSERT INTO multi_resource_apt VALUES
(1, 1),
(2, 1),
(2, 2),
(3, 1),
(3, 2),
(3, 3),
(4, 1),
(4, 2),
(4, 3),
(4, 4);