Last modified: 2012-08-26 09:36:06 UTC
Created attachment 4781 [details] proposed patch Special:UnusedCategories && Special:MostLinkedCategories could benefit from the new "cat_pages" field from the new category table. A patch modifying the SQL queries to use it is included : local testing, after a proper populateCategory.php, seemed successful. I assumed that with that new indexed field, MostLinkedCategories was no more an expensive query : Please double-check me on this. Cheers, Nicolas.
Per IRC discussion; as written this may not work correctly for UnusedCategories, as there may not be a category table entry. For MostLinkedCategories this should work perfectly, though!
Special:MostLinkedCategories patch updated and applied in r103759
Comment on attachment 4781 [details] proposed patch Marking obsolete as patch half applied, and other half is wrong Not sure how much brions statement is still true... On enwiki: mysql> explain select cat_title from category where cat_pages = 0; +----+-------------+----------+------+---------------+-----------+---------+-------+--------+-------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+----------+------+---------------+-----------+---------+-------+--------+-------+ | 1 | SIMPLE | category | ref | cat_pages | cat_pages | 4 | const | 728557 | | +----+-------------+----------+------+---------------+-----------+---------+-------+--------+-------+ 1 row in set (0.00 sec)