It's taking 10 - 11 seconds sometimes to INSERT into my table which has under a dozen records.
I'm getting the following in my database's InnoDB status:
0.29 inserts/s, 0.03 updates/s, 0.09 deletes/s, 20365.73 reads/s. 20.37K reads/s
Seems like a lot--do you agree? I'm not sure the 20K reads is all the same table, but it's quite possible.
I also get
Foreign key constraint fails for table record_lock.
Could the foreign key constraint failure slow things down?
Here is the schema
CREATE TABLE IF NOT EXISTS `record_lock` (
`module_id` int(10) unsigned NOT NULL,
`module_record_id` int(10) unsigned NOT NULL,
`site_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`expiration_date_time` datetime NOT NULL,
`date_time_created` datetime DEFAULT NULL,
PRIMARY KEY (`module_id`,`module_record_id`),
KEY `record_lock_site_id` (`site_id`),
KEY `index_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;