From 3f77eb80fe35f181afc3e9c0f784f2792998b7c1 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 27 Jan 2013 17:52:44 -0700 Subject: [PATCH] add event-id index to prevent large CPU loads when visiting the events page --- boot.php | 2 +- database.sql | 1 + update.php | 18 +++++++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 24b5f5ca9..0eef8b7cf 100644 --- a/boot.php +++ b/boot.php @@ -14,7 +14,7 @@ require_once('include/features.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '3.1.1601' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1158 ); +define ( 'DB_UPDATE_VERSION', 1159 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 28a7c931e..6a4782fb8 100644 --- a/database.sql +++ b/database.sql @@ -589,6 +589,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `uid_commented` (`uid`, `commented`), KEY `uid_created` (`uid`, `created`), KEY `uid_unseen` (`uid`, `unseen`), + KEY `event_id` (`event-id`), FULLTEXT KEY `title` (`title`), FULLTEXT KEY `body` (`body`), FULLTEXT KEY `allow_cid` (`allow_cid`), diff --git a/update.php b/update.php index 1bea71f4d..b70e7b8ce 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@