Permalink
Browse files

indexes for postgres

  • Loading branch information...
1 parent f5e82bc commit e209e0b09e6579b315fd32d38c1d33926c3e7ea1 paca70 committed Apr 27, 2003
Showing with 10 additions and 0 deletions.
  1. +6 −0 lib/db/postgres7.php
  2. +4 −0 lib/db/postgres7.sql
View
6 lib/db/postgres7.php
@@ -121,6 +121,12 @@ function main_upgrade($oldversion=0) {
}
}
+ if ($oldversion < 2003042700) {
+ /// Changing to multiple indexes
+ execute_sql(" CREATE INDEX coursemoduleaction ON {$CFG->prefix}log (course,module,action) ");
+ execute_sql(" CREATE INDEX courseuserid ON {$CFG->prefix}log (course,userid) ");
+ }
+
return $result;
}
?>
View
4 lib/db/postgres7.sql
@@ -64,6 +64,10 @@ CREATE TABLE prefix_log (
info varchar(255) NOT NULL default ''
);
+CREATE INDEX coursemoduleaction ON prefix_log (course,module,action);
+
+CREATE INDEX courseuserid ON prefix_log (course,userid);
+
CREATE TABLE prefix_log_display (
module varchar(20) NOT NULL default '',
action varchar(20) NOT NULL default '',

0 comments on commit e209e0b

Please sign in to comment.