Create Table: CREATE TABLE `zz_info` (
`tid` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL COMMENT '标题',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT 'UID',
`c1` int(11) NOT NULL DEFAULT '0' COMMENT '类目1',
`c2` int(11) NOT NULL DEFAULT '0' COMMENT '类目2',
`c3` int(11) NOT NULL DEFAULT '0' COMMENT '类目3',
`d1` int(11) NOT NULL DEFAULT '0' COMMENT '地区1',
`d2` int(11) NOT NULL DEFAULT '0' COMMENT '地区2',
`d3` int(11) NOT NULL DEFAULT '0' COMMENT '地区3',
`addtime` int(11) NOT NULL COMMENT '发布时间',
`uptime` int(11) NOT NULL COMMENT '更新时间',
`status` smallint(6) NOT NULL DEFAULT '1' COMMENT '信息状态,默认1显示中',
PRIMARY KEY (`tid`),
KEY `idx-info-uid` (`uid`),
KEY `idx-info-c1` (`c1`),
KEY `idx-info-c2` (`c2`),
KEY `idx-info-c3` (`c3`),
KEY `idx-info-d1` (`d1`),
KEY `idx-info-d2` (`d2`),
KEY `idx-info-d3` (`d3`),
KEY `idx-info-status` (`status`),
KEY `uptime` (`uptime`),
KEY `idx-info-status-c2` (`status`,`c2`),
KEY `idx-info-status-d1` (`status`,`d1`),
KEY `idx-info-status-c1` (`status`,`c1`),
KEY `idx-info-status-d2` (`status`,`d2`),
KEY `idx-info-status-c2-d2` (`status`,`c2`,`d2`)
) ENGINE=InnoDB AUTO_INCREMENT=16538560 DEFAULT CHARSET=utf8
/*!50100 PARTITION BY HASH (tid)
PARTITIONS 10 */
1 row in set (0.00 sec)
以上一个数据表, idx-info-d1 与 idx-info-status-d1 是否有重复?是否是在 idx-info-status-d1 中包含了 idx-info-d1?
会出现以下几类查询SQL:d1单独查询、d2单独查询、d1与status组合、d2与status组合、d2+c2+status 组合、c1+status、c2+status