Add rc_name_type_patrolled_timestamp index

Bug: T140108
Change-Id: I382a5f0daef703a3d16fe008a5e1d1402f2c7b33
This commit is contained in:
Brad Jorsch 2016-07-14 12:01:04 -04:00
parent 090b37a486
commit adf9875c74
11 changed files with 31 additions and 1 deletions

View file

@ -87,7 +87,11 @@ class MssqlUpdater extends DatabaseUpdater {
[ 'updateSchema', 'recentchanges', 'recentchanges-drop-fks',
'patch-recentchanges-drop-fks.sql' ],
[ 'updateSchema', 'logging', 'logging-drop-fks', 'patch-logging-drop-fks.sql' ],
[ 'updateSchema', 'archive', 'archive-drop-fks', 'patch-archive-drop-fks.sql' ]
[ 'updateSchema', 'archive', 'archive-drop-fks', 'patch-archive-drop-fks.sql' ],
// 1.28
[ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
];
}

View file

@ -283,6 +283,10 @@ class MysqlUpdater extends DatabaseUpdater {
[ 'addIndex', 'categorylinks', 'cl_collation_ext',
'patch-add-cl_collation_ext_index.sql' ],
[ 'doCollationUpdate' ],
// 1.28
[ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
];
}

View file

@ -113,6 +113,10 @@ class OracleUpdater extends DatabaseUpdater {
[ 'dropTable', 'msg_resource' ],
[ 'addField', 'watchlist', 'wl_id', 'patch-watchlist-wl_id.sql' ],
// 1.28
[ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
// KEEP THIS AT THE BOTTOM!!
[ 'doRebuildDuplicateFunction' ],

View file

@ -433,6 +433,10 @@ class PostgresUpdater extends DatabaseUpdater {
'addPgField', 'watchlist', 'wl_id',
"INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('watchlist_wl_id_seq')"
],
// 1.28
[ 'addPgIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
'( rc_namespace, rc_type, rc_patrolled, rc_timestamp )' ],
];
}

View file

@ -152,6 +152,10 @@ class SqliteUpdater extends DatabaseUpdater {
[ 'addIndex', 'categorylinks', 'cl_collation_ext',
'patch-add-cl_collation_ext_index.sql' ],
[ 'doCollationUpdate' ],
// 1.28
[ 'addIndex', 'recentchanges', 'rc_name_type_patrolled_timestamp',
'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
];
}

View file

@ -0,0 +1,2 @@
-- @since 1.28
CREATE INDEX /*i*/rc_name_type_patrolled_timestamp ON /*_*/recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);

View file

@ -861,6 +861,7 @@ CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,
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 (

View file

@ -0,0 +1,4 @@
define mw_prefix='{$wgDBprefix}';
CREATE INDEX &mw_prefix.recentchanges_i08 ON &mw_prefix.recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);

View file

@ -434,6 +434,7 @@ CREATE INDEX &mw_prefix.recentchanges_i04 ON &mw_prefix.recentchanges (rc_new,rc
CREATE INDEX &mw_prefix.recentchanges_i05 ON &mw_prefix.recentchanges (rc_ip);
CREATE INDEX &mw_prefix.recentchanges_i06 ON &mw_prefix.recentchanges (rc_namespace, rc_user_text);
CREATE INDEX &mw_prefix.recentchanges_i07 ON &mw_prefix.recentchanges (rc_user_text, rc_timestamp);
CREATE INDEX &mw_prefix.recentchanges_i08 ON &mw_prefix.recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
CREATE TABLE &mw_prefix.watchlist (
wl_id NUMBER NOT NULL,

View file

@ -446,6 +446,7 @@ CREATE INDEX rc_namespace_title ON recentchanges (rc_namespace, rc_title);
CREATE INDEX rc_cur_id ON recentchanges (rc_cur_id);
CREATE INDEX new_name_timestamp ON recentchanges (rc_new, rc_namespace, rc_timestamp);
CREATE INDEX rc_ip ON recentchanges (rc_ip);
CREATE INDEX rc_name_type_patrolled_timestamp ON recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
CREATE SEQUENCE watchlist_wl_id_seq;

View file

@ -1136,6 +1136,7 @@ CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,
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 (