Patch for speeding up "Oldest articles" special page.
authorErik Moeller <erik@users.mediawiki.org>
Fri, 23 May 2003 06:15:13 +0000 (06:15 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Fri, 23 May 2003 06:15:13 +0000 (06:15 +0000)
maintenance/archives/patch-list.txt
maintenance/archives/patch-oldestindex.sql [new file with mode: 0644]

index b660a5b..a5f1854 100644 (file)
@@ -104,4 +104,8 @@ Run patch-cache.sql on the database to set these fields up. This is
 required for changes to OutputPage.php and elsewhere to continue
 working on an older database.
 
 required for changes to OutputPage.php and elsewhere to continue
 working on an older database.
 
+* 2003-05-23: Index for "Oldest articles"
+"Oldest articles" needs an index on namespace, redirect and timestamp
+to be reasonably fast. (patch-oldestindex.sql)
+
 OutputPage.php User.php maintenance/buildTables.inc maintenance/patch-cache.sql maintenance/patch-list.txt
 OutputPage.php User.php maintenance/buildTables.inc maintenance/patch-cache.sql maintenance/patch-list.txt
diff --git a/maintenance/archives/patch-oldestindex.sql b/maintenance/archives/patch-oldestindex.sql
new file mode 100644 (file)
index 0000000..83aa694
--- /dev/null
@@ -0,0 +1,5 @@
+-- Add index for "Oldest articles" (Special:Ancientpages)
+-- 2003-05-23 Erik Moeller <moeller@scireview.de>
+
+ALTER TABLE cur
+   ADD KEY namespace_redirect_timestamp(cur_namespace,cur_is_redirect,cur_timestamp);
\ No newline at end of file