r23016 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23015‎ | r23016 | r23017 >
Date:18:37, 15 June 2007
Author:yurik
Status:old
Tags:
Comment:
bug 10280: For table categorylinks, add cl_from to the cl_sortkey index
Modified paths:
  • /trunk/phase3/maintenance/archives/patch-categorylinksindex.sql (added) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-categorylinksindex.sql
@@ -0,0 +1,11 @@
 2+--
 3+-- patch-categorylinksindex.sql
 4+--
 5+-- Per bug 10280 / http://bugzilla.wikimedia.org/show_bug.cgi?id=10280
 6+--
 7+-- Improve enum continuation performance of the what pages belong to a category query
 8+--
 9+
 10+ALTER TABLE /*$wgDBprefix*/categorylinks
 11+ DROP INDEX cl_sortkey,
 12+ ADD INDEX cl_sortkey(cl_to, cl_sortkey, cl_from);
Property changes on: trunk/phase3/maintenance/archives/patch-categorylinksindex.sql
___________________________________________________________________
Name: svn:eol-style
113 + native
Index: trunk/phase3/maintenance/updaters.inc
@@ -837,6 +837,14 @@
838838 }
839839 }
840840
 841+function do_categorylinks_indices_update() {
 842+ echo( "Checking for categorylinks indices...\n" );
 843+ if (!index_has_field('categorylinks', 'cl_sortkey', 'cl_from'))
 844+ {
 845+ dbsource( archive( 'patch-categorylinksindex.sql' ) );
 846+ }
 847+}
 848+
841849 function do_stats_init() {
842850 // Sometimes site_stats table is not properly populated.
843851 global $wgDatabase;
@@ -932,6 +940,8 @@
933941
934942 do_backlinking_indices_update(); flush();
935943
 944+ do_categorylinks_indices_update(); flush();
 945+
936946 do_restrictions_update(); flush ();
937947
938948 echo "Deleting old default messages (this may take a long time!)..."; flush();

Follow-up revisions

RevisionCommit summaryAuthorDate
r23039Merged revisions 22967-23037 via svnmerge from...david20:15, 16 June 2007
r23228Forgot to update table sql per bug 10280yurik15:19, 22 June 2007
r23407Merged revisions 23203-23405 via svnmerge from...david23:00, 25 June 2007

Status & tagging log