Last modified: 2012-08-26 09:36:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15577, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13577 - Optimize query in Special Unusedcategories & Special Mostlinkedcategories by using category table
Optimize query in Special Unusedcategories & Special Mostlinkedcategories by ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks: 13326 39661
  Show dependency treegraph
 
Reported: 2008-04-01 12:45 UTC by Nicolas Dumazet
Modified: 2012-08-26 09:36 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
proposed patch (1.77 KB, patch)
2008-04-01 12:45 UTC, Nicolas Dumazet
Details

Description Nicolas Dumazet 2008-04-01 12:45:56 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.
Comment 1 Brion Vibber 2008-04-07 22:55:55 UTC
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!
Comment 2 Sam Reed (reedy) 2011-11-20 14:51:00 UTC
Special:MostLinkedCategories patch updated and applied in r103759
Comment 3 Sam Reed (reedy) 2011-11-20 14:53:08 UTC
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)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links