Re: Identical servers different plan for the same query
Posted by:
Eric Coll
Date: April 07, 2012 09:55AM
BTW, I am using InnoDB. Tables definition (no FK here, simplified version)
CREATE TABLE `last_timestamp` (
`region` varchar(10) NOT NULL,
`datatype` varchar(20) NOT NULL,
`timestamp` bigint(20) NOT NULL,
PRIMARY KEY (`region`,`datatype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE TABLE `pool_usage` (
`region` varchar(10) NOT NULL,
`timestamp` bigint(20) NOT NULL,
`s_used` int(11) NOT NULL,
...
UNIQUE KEY `idx_usage_unique` (`timestamp`,`zone`,`pool_type_id`,`week`,`account`,`instance_class`,`operation`),
KEY `idx_usage_account` (`account`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8