Welcome Guest, Not a member yet? Register   Sign In
Very slow insert and update into ci_session
#1

[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?


Messages In This Thread
Very slow insert and update into ci_session - by El Forum - 08-02-2011, 01:05 PM
Very slow insert and update into ci_session - by El Forum - 08-02-2011, 02:30 PM
Very slow insert and update into ci_session - by El Forum - 08-02-2011, 02:36 PM
Very slow insert and update into ci_session - by El Forum - 08-02-2011, 03:30 PM
Very slow insert and update into ci_session - by El Forum - 08-02-2011, 09:19 PM
Very slow insert and update into ci_session - by El Forum - 08-06-2011, 12:17 PM
Very slow insert and update into ci_session - by El Forum - 08-06-2011, 06:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB