Why this query is so slow?
- by Silver Light
This query appears in mysql slow query log: it takes 11 seconds.    
INSERT INTO record_visits
( record_id, visit_day )
VALUES
( '567', NOW() );
The table has 501043 records and it's structure looks like this:
CREATE TABLE IF NOT EXISTS `record_visits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `record_id` int(11) DEFAULT NULL,
  `visit_day` date DEFAULT NULL,
  `visit_cnt` bigint(20) DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `record_id_visit_day` (`record_id`,`visit_day`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;
What could be wrong? Why this INSERT takes so long?