Added some more indices to speed some stuff up (MySQL only)
authorDan
Thu, 16 Apr 2009 00:53:05 -0400
changeset 926 f0cbbd06081e
parent 925 173aef60c13c
child 927 e964577b5fa9
Added some more indices to speed some stuff up (MySQL only)
install/schemas/mysql_stage2.sql
--- a/install/schemas/mysql_stage2.sql	Wed Apr 15 22:53:03 2009 -0400
+++ b/install/schemas/mysql_stage2.sql	Thu Apr 16 00:53:05 2009 -0400
@@ -344,7 +344,12 @@
 -- of 1000 bytes. It's low like that because of the UTF-8 character set being used.
 ALTER TABLE {{TABLE_PREFIX}}logs ADD INDEX {{TABLE_PREFIX}}logs_page_idx (page_id(317), namespace);
 ALTER TABLE {{TABLE_PREFIX}}logs ADD INDEX {{TABLE_PREFIX}}logs_time_idx (time_id);
+ALTER TABLE {{TABLE_PREFIX}}logs ADD INDEX {{TABLE_PREFIX}}logs_action_idx (log_type, action);
 ALTER TABLE {{TABLE_PREFIX}}comments ADD INDEX {{TABLE_PREFIX}}comments_page_idx (page_id(317), namespace);
+ALTER TABLE {{TABLE_PREFIX}}hits ADD INDEX {{TABLE_PREFIX}}hits_time_idx ( time );
+ALTER TABLE {{TABLE_PREFIX}}hits ADD INDEX {{TABLE_PREFIX}}hits_page_idx (page_id(317), namespace);
+ALTER TABLE {{TABLE_PREFIX}}pages ADD INDEX {{TABLE_PREFIX}}pages_page_idx (urlname(317), namespace);
+ALTER TABLE {{TABLE_PREFIX}}page_text ADD INDEX {{TABLE_PREFIX}}page_text_page_idx (page_id(317), namespace);
 
 -- The default config. Kind of important.
 -- P.S. the allowed_mime_types value is a compressed bitfield. Source for the (rather simple) algo is in functions.php.