Merge "Add rc_name_type_patrolled_timestamp index"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 11 Aug 2016 01:58:49 +0000 (01:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 11 Aug 2016 01:58:49 +0000 (01:58 +0000)
1  2 
maintenance/mssql/tables.sql
maintenance/tables.sql

@@@ -336,9 -336,9 +336,9 @@@ CREATE INDEX /*i*/cl_timestamp ON /*_*/
  CREATE INDEX /*i*/cl_collation_ext ON /*_*/categorylinks (cl_collation, cl_to, cl_type, cl_from);
  
  --
 --- Track all existing categories.  Something is a category if 1) it has an en-
 --- try somewhere in categorylinks, or 2) it once did.  Categories might not
 --- have corresponding pages, so they need to be tracked separately.
 +-- Track all existing categories. Something is a category if 1) it has an entry
 +-- somewhere in categorylinks, or 2) it has a description page. Categories
 +-- might not have corresponding pages, so they need to be tracked separately.
  --
  CREATE TABLE /*_*/category (
    -- Primary key
@@@ -861,6 -861,7 +861,7 @@@ CREATE INDEX /*i*/new_name_timestamp O
  CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip);
  CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text);
  CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp);
+ CREATE INDEX /*i*/rc_name_type_patrolled_timestamp ON /*_*/recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
  
  
  CREATE TABLE /*_*/watchlist (
diff --combined maintenance/tables.sql
@@@ -623,9 -623,9 +623,9 @@@ CREATE INDEX /*i*/cl_timestamp ON /*_*/
  CREATE INDEX /*i*/cl_collation_ext ON /*_*/categorylinks (cl_collation, cl_to, cl_type, cl_from);
  
  --
 --- Track all existing categories.  Something is a category if 1) it has an en-
 --- try somewhere in categorylinks, or 2) it once did.  Categories might not
 --- have corresponding pages, so they need to be tracked separately.
 +-- Track all existing categories. Something is a category if 1) it has an entry
 +-- somewhere in categorylinks, or 2) it has a description page. Categories
 +-- might not have corresponding pages, so they need to be tracked separately.
  --
  CREATE TABLE /*_*/category (
    -- Primary key
@@@ -1136,6 -1136,7 +1136,7 @@@ CREATE INDEX /*i*/new_name_timestamp O
  CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip);
  CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text);
  CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp);
+ CREATE INDEX /*i*/rc_name_type_patrolled_timestamp ON /*_*/recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
  
  
  CREATE TABLE /*_*/watchlist (