--- /dev/null
+--
+-- patch-categorylinksindex.sql
+--
+-- Per bug 10280 / http://bugzilla.wikimedia.org/show_bug.cgi?id=10280
+--
+-- Improve enum continuation performance of the what pages belong to a category query
+--
+
+ALTER TABLE /*$wgDBprefix*/categorylinks
+ DROP INDEX cl_sortkey,
+ ADD INDEX cl_sortkey(cl_to, cl_sortkey, cl_from);
}
}
+function do_categorylinks_indices_update() {
+ echo( "Checking for categorylinks indices...\n" );
+ if (!index_has_field('categorylinks', 'cl_sortkey', 'cl_from'))
+ {
+ dbsource( archive( 'patch-categorylinksindex.sql' ) );
+ }
+}
+
function do_stats_init() {
// Sometimes site_stats table is not properly populated.
global $wgDatabase;
do_backlinking_indices_update(); flush();
+ do_categorylinks_indices_update(); flush();
+
do_restrictions_update(); flush ();
echo "Deleting old default messages (this may take a long time!)..."; flush();