In the process of building a new benchmark tool for Yahoo, I
needed a good "guinea pig." I think I found the one by showing
how much more powerful covering indexes can be with InnoDB. A
covering index is one where the index itself contains all of the
necessary data field(s). In other words, no need to access the
data page!
Here's a sample table:
CREATE TABLE entity (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`entity_type` enum('Advertiser','Publisher','Network') NOT NULL DEFAULT 'Advertiser',
`managing_entity_id` int(10) unsigned DEFAULT NULL,
....
PRIMARY KEY (`id`),
KEY `ix_entity_managing_entity_id` (`managing_entity_id`),
....
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
It's a wide table with 88 some odd columns with an average row
length of 240 bytes.
Now to test the QPS difference between a query like this:
SELECT * FROM …
[Read more]