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 |
1 | 13 | + native |
Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -837,6 +837,14 @@ |
838 | 838 | } |
839 | 839 | } |
840 | 840 | |
| 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 | + |
841 | 849 | function do_stats_init() { |
842 | 850 | // Sometimes site_stats table is not properly populated. |
843 | 851 | global $wgDatabase; |
— | — | @@ -932,6 +940,8 @@ |
933 | 941 | |
934 | 942 | do_backlinking_indices_update(); flush(); |
935 | 943 | |
| 944 | + do_categorylinks_indices_update(); flush(); |
| 945 | + |
936 | 946 | do_restrictions_update(); flush (); |
937 | 947 | |
938 | 948 | echo "Deleting old default messages (this may take a long time!)..."; flush(); |