With the growing adoption of Google’s User Statistics Patch**, the need for supporting scripts has become clear. To that end, we’ve created check-unused-keys, a Perl script to provide a nicer interface than directly querying the INFORMATION_SCHEMA database.
Indexes in MySQL
MySQL does not always make a right decision about indexes usage. Condsider a simple table: CREATE TABLE `t2` ( `ID` int(11) default NULL, `ID1` int(11) default NULL, `SUBNAME` varchar(32) default NULL, KEY `ID1` (`ID1`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT COUNT(*) FROM t2 ; 250001 (V1) SELECT COUNT(*) FROM t2 WHERE ID1=1 ; 83036 (V2) (execution [...]

