The table below currently contains approx. 1.6mm records, inserts on this table are consistently slow, i.e. between 2 and 4 seconds. Any suggestions, thoughts as to where to look?
CREATE TABLE log (
id int(11) NOT NULL AUTO_INCREMENT,
sid int(11) NOT NULL,
activity_type enum(‘a’,‘b’,'c) DEFAULT ‘a’,
activity_name int(11) DEFAULT NULL,
activity_description varchar(50) DEFAULT NULL,
activity_date datetime NOT NULL,
activity_score int(11) DEFAULT NULL,
lid int(11) NOT NULL,
wrong text,
num tinyint(3) unsigned DEFAULT ‘0’,
num_wrong tinyint(3) unsigned DEFAULT ‘0’,
num_right tinyint(3) unsigned DEFAULT ‘0’,
num_missing tinyint(3) unsigned DEFAULT ‘0’,
external_id int(11) DEFAULT NULL,
end datetime DEFAULT NULL,
time_offset char(6) DEFAULT ‘-04:00’,
PRIMARY KEY (id),
KEY lid (id),
KEY slid (sid,lid),
KEY aname (activity_name)
) ENGINE=InnoDB AUTO_INCREMENT=2319610 DEFAULT CHARSET=utf8