Explorar el Código

! Add index to the moderation log table, this will potentially have other benefits later too. Board/log index didn't seem to have any benefits. Fixes #317

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer hace 11 años
padre
commit
eb506b9942

+ 2 - 1
other/install_2-1_mysql.sql

@@ -763,7 +763,8 @@ CREATE TABLE {$db_prefix}log_actions (
   KEY log_time (log_time),
   KEY id_member (id_member),
   KEY id_board (id_board),
-  KEY id_msg (id_msg)
+  KEY id_msg (id_msg),
+  KEY id_topic_id_log {$db_prefix}log_actions (id_topic, id_log)
 ) ENGINE=MyISAM;
 
 #

+ 1 - 0
other/install_2-1_postgresql.sql

@@ -997,6 +997,7 @@ CREATE INDEX {$db_prefix}log_actions_id_member ON {$db_prefix}log_actions (id_me
 CREATE INDEX {$db_prefix}log_actions_id_board ON {$db_prefix}log_actions (id_board);
 CREATE INDEX {$db_prefix}log_actions_id_msg ON {$db_prefix}log_actions (id_msg);
 CREATE INDEX {$db_prefix}log_actions_id_log ON {$db_prefix}log_actions (id_log);
+CREATE INDEX {$db_prefix}log_actions_id_topic_id_log {$db_prefix}log_actions (id_topic, id_log);
 
 #
 # Table structure for table `log_activity`

+ 1 - 0
other/install_2-1_sqlite.sql

@@ -792,6 +792,7 @@ CREATE INDEX {$db_prefix}log_actions_id_member ON {$db_prefix}log_actions (id_me
 CREATE INDEX {$db_prefix}log_actions_id_board ON {$db_prefix}log_actions (id_board);
 CREATE INDEX {$db_prefix}log_actions_id_msg ON {$db_prefix}log_actions (id_msg);
 CREATE INDEX {$db_prefix}log_actions_id_log ON {$db_prefix}log_actions (id_log);
+CREATE INDEX {$db_prefix}log_actions_id_topic_id_log {$db_prefix}log_actions (id_topic, id_log);
 
 #
 # Table structure for table `log_activity`

+ 1 - 0
other/install_2-1_sqlite3.sql

@@ -792,6 +792,7 @@ CREATE INDEX {$db_prefix}log_actions_id_member ON {$db_prefix}log_actions (id_me
 CREATE INDEX {$db_prefix}log_actions_id_board ON {$db_prefix}log_actions (id_board);
 CREATE INDEX {$db_prefix}log_actions_id_msg ON {$db_prefix}log_actions (id_msg);
 CREATE INDEX {$db_prefix}log_actions_id_log ON {$db_prefix}log_actions (id_log);
+CREATE INDEX {$db_prefix}log_actions_id_topic_id_log {$db_prefix}log_actions (id_topic, id_log);
 
 #
 # Table structure for table `log_activity`