From: moodler Date: Sat, 26 Apr 2003 15:26:51 +0000 (+0000) Subject: Working much better with indexes - update the schema X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1ba39602853f9247a4622dfbe6fc333299c5857f;p=moodle.git Working much better with indexes - update the schema --- diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 154512b677..834a793c0d 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -347,7 +347,7 @@ function main_upgrade($oldversion=0) { } } - if ($oldversion < 2003042600) { + if ($oldversion < 2003042600) { /// Some more indexes - we need al the help we can get on the logs execute_sql(" ALTER TABLE `{$CFG->prefix}log` ADD INDEX(module) "); execute_sql(" ALTER TABLE `{$CFG->prefix}log` ADD INDEX(action) "); diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index eb4094ac83..f7a5e4ba01 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -113,7 +113,9 @@ CREATE TABLE `prefix_log` ( `info` varchar(255) NOT NULL default '', PRIMARY KEY (`id`), KEY `course` (`course`), - KEY `userid` (`userid`) + KEY `userid` (`userid`), + KEY `module` (`module`), + KEY `action` (`action`) ) TYPE=MyISAM COMMENT='Every action is logged as far as possible.'; # --------------------------------------------------------