Merge "Add index on rc_this_oldid"

This commit is contained in:
jenkins-bot 2018-08-17 20:45:43 +00:00 committed by Gerrit Code Review
commit 4444f35d1d
10 changed files with 16 additions and 0 deletions

View file

@ -144,6 +144,7 @@ class MssqlUpdater extends DatabaseUpdater {
[ 'addIndex', 'protected_titles', 'PRIMARY', 'patch-protected_titles-pk.sql' ],
[ 'addIndex', 'page_props', 'PRIMARY', 'patch-page_props-pk.sql' ],
[ 'addIndex', 'site_identifiers', 'PRIMARY', 'patch-site_identifiers-pk.sql' ],
[ 'addIndex', 'recentchanges', 'rc_this_oldid', 'patch-recentchanges-rc_this_oldid-index.sql' ],
];
}

View file

@ -367,6 +367,7 @@ class MysqlUpdater extends DatabaseUpdater {
'patch-protected_titles-fix-pk.sql' ],
[ 'renameIndex', 'site_identifiers', 'site_ids_type', 'PRIMARY', false,
'patch-site_identifiers-fix-pk.sql' ],
[ 'addIndex', 'recentchanges', 'rc_this_oldid', 'patch-recentchanges-rc_this_oldid-index.sql' ],
];
}

View file

@ -155,6 +155,7 @@ class OracleUpdater extends DatabaseUpdater {
[ 'addField', 'change_tag', 'ct_tag_id', 'patch-change_tag-tag_id.sql' ],
[ 'addIndex', 'archive', 'ar_revid_uniq', 'patch-archive-ar_rev_id-unique.sql' ],
[ 'populateContentTables' ],
[ 'addIndex', 'recentchanges', 'rc_this_oldid', 'patch-recentchanges-rc_this_oldid-index.sql' ],
// KEEP THIS AT THE BOTTOM!!
[ 'doRebuildDuplicateFunction' ],

View file

@ -590,6 +590,7 @@ class PostgresUpdater extends DatabaseUpdater {
[ 'addIndex', 'interwiki', 'interwiki_pkey', 'patch-interwiki-pk.sql' ],
[ 'addIndex', 'protected_titles', 'protected_titles_pkey', 'patch-protected_titles-pk.sql' ],
[ 'addIndex', 'site_identifiers', 'site_identifiers_pkey', 'patch-site_identifiers-pk.sql' ],
[ 'addPgIndex', 'recentchanges', 'rc_this_oldid', '(rc_this_oldid)' ],
];
}

View file

@ -231,6 +231,7 @@ class SqliteUpdater extends DatabaseUpdater {
'patch-protected_titles-fix-pk.sql' ],
[ 'renameIndex', 'site_identifiers', 'site_ids_type', 'PRIMARY', false,
'patch-site_identifiers-fix-pk.sql' ],
[ 'addIndex', 'recentchanges', 'rc_this_oldid', 'patch-recentchanges-rc_this_oldid-index.sql' ],
];
}

View file

@ -0,0 +1,6 @@
-- Add an index to recentchanges on rc_this_oldid
--
-- T139012
--
CREATE INDEX /*i*/rc_this_oldid ON /*_*/recentchanges(rc_this_oldid);

View file

@ -1052,6 +1052,7 @@ CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp
CREATE INDEX /*i*/rc_ns_actor ON /*_*/recentchanges (rc_namespace, rc_actor);
CREATE INDEX /*i*/rc_actor ON /*_*/recentchanges (rc_actor, rc_timestamp);
CREATE INDEX /*i*/rc_name_type_patrolled_timestamp ON /*_*/recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
CREATE INDEX /*i*/rc_this_oldid ON /*_*/recentchanges (rc_this_oldid);
CREATE TABLE /*_*/watchlist (

View file

@ -721,6 +721,7 @@ CREATE INDEX &mw_prefix.recentchanges_i07 ON &mw_prefix.recentchanges (rc_user_t
CREATE INDEX &mw_prefix.rc_ns_actor ON &mw_prefix.recentchanges (rc_namespace, rc_actor);
CREATE INDEX &mw_prefix.rc_actor ON &mw_prefix.recentchanges (rc_actor, rc_timestamp);
CREATE INDEX &mw_prefix.recentchanges_i08 ON &mw_prefix.recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
CREATE INDEX &mw_prefix.recentchanges_i10 ON &mw_prefix.recentchanges (rc_this_oldid);
/*$mw$*/
CREATE TRIGGER &mw_prefix.recentchanges_seq_trg BEFORE INSERT ON &mw_prefix.recentchanges
FOR EACH ROW WHEN (new.rc_id IS NULL)

View file

@ -588,6 +588,7 @@ 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 INDEX rc_this_oldid ON recentchanges (rc_this_oldid);
CREATE SEQUENCE watchlist_wl_id_seq;

View file

@ -1471,6 +1471,8 @@ CREATE INDEX /*i*/rc_actor ON /*_*/recentchanges (rc_actor, rc_timestamp);
-- ApiQueryRecentChanges (T140108)
CREATE INDEX /*i*/rc_name_type_patrolled_timestamp ON /*_*/recentchanges (rc_namespace, rc_type, rc_patrolled, rc_timestamp);
-- Article.php and friends (T139012)
CREATE INDEX /*i*/rc_this_oldid ON /*_*/recentchanges (rc_this_oldid);
CREATE TABLE /*_*/watchlist (
wl_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,