I know that I should probably change the type field to a numerical index, but I don't think that would be that much of a problem since there are only 2-3 different values (this will be changed, just potentially more important things on my plate).
Code: Select all
SELECT COUNT(snlist.id) AS count, type
FROM snlist
GROUP BY typeCode: Select all
CREATE TABLE IF NOT EXISTS `snlist` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`userkey` varchar(100) NOT NULL,
`type` varchar(6) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `userkey` (`userkey`),
KEY `type` (`type`),
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4594005 ;Code: Select all
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE snlist index NULL type 8 NULL 3929238 Using indexThanks!