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 (
-- A table to track tags for revisions, logs and recent changes.
CREATE TABLE /*_*/change_tag (
+ ct_id int NOT NULL PRIMARY KEY IDENTITY,
-- RCID for the change
ct_rc_id int NULL REFERENCES /*_*/recentchanges(rc_id),
-- LOGID for the change
-- Rollup table to pull a LIST of tags simply without ugly GROUP_CONCAT
-- that only works on MySQL 4.1+
CREATE TABLE /*_*/tag_summary (
+ ts_id int NOT NULL PRIMARY KEY IDENTITY,
-- RCID for the change
ts_rc_id int NULL REFERENCES /*_*/recentchanges(rc_id),
-- LOGID for the change