[eluser]devastator[/eluser]
Hello, i have small problem on a live site with 5 000 unique visitors i have ci_session table with no more then 500 records and some times i have VERY VERY slow insert and/or update queries in this table like this query took 2 seconds and mysql is NOT overloaded.
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('79a7bf6b52545c9b785d9bca4072843f', '85.83.41.147', 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1;', 1312311462)
this is structure of table
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`session_id` varchar(40) NOT NULL DEFAULT '0',
`ip_address` varchar(16) NOT NULL DEFAULT '0',
`user_agent` varchar(50) NOT NULL,
`last_activity` int(10) unsigned NOT NULL DEFAULT '0',
`user_data` text NOT NULL,
PRIMARY KEY (`session_id`),
UNIQUE KEY `Session_ID` (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Have any idea how to optimize this?