Welcome Guest, Not a member yet? Register   Sign In
Why is the "ci_sessions" table type MyISAM?
#8

[eluser]RaZoR LeGaCy[/eluser]
Running APC plus memcache.

I am having a lot of slow queries for ci_sessions, the list is longer but you get the idea. MySQL log returns:

Code:
# Time: 100727 18:51:45

# Query_time: 14  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('e27c96e05f2a22bf87b77ebb5aac2b2d', '67.195.114.215', 'Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://', 1280271091);
# Time: 100727 18:53:10

# Query_time: 12  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('664d9ed5da1e7086dbce48bf48fc48c8', '118.81.99.85', 'Mozilla/3.0 (compatible; Indy Library)', 1280271178);
# Time: 100727 19:08:53

# Query_time: 12  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('094498eaed248968bad4fa045190b2ae', '66.249.65.145', 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://ww', 1280272121);
# Time: 100727 19:14:13

# Query_time: 13  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('229c467afb6bb42b9f0bceaef8155542', '66.249.65.145', 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://ww', 1280272440);
# Time: 100727 19:15:20

# Query_time: 14  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('d2a7795692eda11379ca56247d4f675f', '67.195.114.215', 'Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://', 1280272506);
# Time: 100727 19:47:55

# Query_time: 12  Lock_time: 0  Rows_sent: 0  Rows_examined: 0
use ci;
INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('7b808ec0c2de270abc78adbe2c74350e', '66.249.65.220', 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://ww', 1280274463);

DB Structure
Code:
CREATE TABLE IF NOT EXISTS `ci_sessions` (
  `session_id` varchar(40) collate utf8_unicode_ci NOT NULL default '0',
  `ip_address` varchar(16) collate utf8_unicode_ci NOT NULL default '0',
  `user_agent` varchar(50) collate utf8_unicode_ci NOT NULL default '',
  `last_activity` int(10) unsigned NOT NULL default '0',
  `session_data` text collate utf8_unicode_ci,
  `user_data` text collate utf8_unicode_ci,
  PRIMARY KEY  (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

config/database.php
Code:
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "cache";

config/config.php
Code:
$config['sess_expiration']      = 7200; // 2hours

$config['sess_encrypt_cookie']  = TRUE;

$config['sess_use_database']    = TRUE;

$config['sess_table_name']      = 'ci_sessions';

$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent'] = FALSE;

$config['sess_time_to_update'] = 300;

Seems like Yahoo/Google bots are the culprits but soon users will be seeing these issues when site traffic increases.

What are some solutions to fix this?


Messages In This Thread
Why is the "ci_sessions" table type MyISAM? - by El Forum - 01-21-2009, 01:43 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 01-21-2009, 10:35 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 01-21-2009, 11:03 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 01-22-2009, 12:48 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 01-22-2009, 01:01 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 02-10-2010, 06:45 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 02-10-2010, 07:26 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-03-2010, 10:00 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-03-2010, 10:18 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-03-2010, 11:31 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-03-2010, 12:44 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-03-2010, 01:50 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-03-2010, 03:54 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-03-2010, 05:07 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-04-2010, 12:39 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-04-2010, 02:00 AM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-04-2010, 03:11 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-04-2010, 03:22 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 08-04-2010, 09:34 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 09-09-2010, 06:24 PM
Why is the "ci_sessions" table type MyISAM? - by El Forum - 09-10-2010, 12:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB