ALTER TABLE `log` ADD INDEX ( `type` ) ;
ALTER TABLE `log` ADD INDEX ( `date` ) ;

DELETE FROM `log` WHERE `type` > 4 AND `type` < 10;

ALTER TABLE `user` ADD INDEX ( `user` ) ;