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`…