From 54ed823aba4c98cd96dc74b9e3a7f435b1faa15f Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sat, 25 Sep 2021 15:15:33 -0500 Subject: [PATCH] Add index to database session handler for session expiry Greatly improves garbage collection performance Fixes: #4574 --- e107_core/sql/core_sql.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e107_core/sql/core_sql.php b/e107_core/sql/core_sql.php index cfb483cd36..f9d5f5ad9c 100755 --- a/e107_core/sql/core_sql.php +++ b/e107_core/sql/core_sql.php @@ -478,8 +478,9 @@ session_id varchar(250) NOT NULL default '', session_expires int(10) unsigned NOT NULL default 0, session_user int(10) unsigned default NULL, - session_data mediumtext NOT NULL, - PRIMARY KEY (session_id) + session_data longtext NOT NULL, + PRIMARY KEY (session_id), + INDEX (session_expires) ) ENGINE=MyISAM; # --------------------------------------------------------