Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #223 from joomlatools/feature/222-sessions
Browse files Browse the repository at this point in the history
Use MyISAM engine for users_sessions table
  • Loading branch information
johanjanssens committed Jul 10, 2015
2 parents d318541 + ea1ae2c commit 5b30f11
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion install/mysql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ CREATE TABLE IF NOT EXISTS `users_roles` (
--
-- Table structure for table `session`
--
-- InnoDB tables can make a database slow down if not using incremental primary keys. We are storing the session hash as
-- primary key, which can result in big load times when the table grows. Hence why we use MyISAM for the session table.
--
-- More info see : http://blog.johnjosephbachir.org/2006/10/22/everything-you-need-to-know-about-designing-mysql-innodb-primary-keys/
--

CREATE TABLE IF NOT EXISTS `users_session` (
`session_id` varchar(200) NOT NULL DEFAULT '',
Expand All @@ -357,7 +362,7 @@ CREATE TABLE IF NOT EXISTS `users_session` (
PRIMARY KEY (`session_id`),
KEY `userid` (`userid`),
KEY `time` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


-- --------------------------------------------------------
Expand Down

0 comments on commit 5b30f11

Please sign in to comment.