Last modified: 2014-08-04 00:32:35 UTC
http://translatewiki.net/sandwiki/profileinfo.php?sort=time_per_call&expand=SQL+Queries Name Time (%) Memory (%) Count Calls/req ms/call kb/call ms/req kb/req Special:Fewestrevisions 0.5% 0% 1 0 54813.9 3212.59 1.18 0.07
mysql> describe SELECT page_namespace AS namespace,page_title AS title,COUNT(*) AS value,page_is_redirect AS redirect FROM `mw_revision`,`mw_page` WHERE page_namespace = '0' AND (page_id = rev_page) GROUP BY page_namespace, page_title, page_is_redirect HAVING COUNT(*) > 1 ORDER BY value LIMIT 50\G +----+-------------+-------------+------+----------------------------+-------------+---------+------------------------+------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------------+------+----------------------------+-------------+---------+------------------------+------+----------------------------------------------+ | 1 | SIMPLE | mw_page | ref | PRIMARY,name_title | name_title | 4 | const | 3 | Using where; Using temporary; Using filesort | | 1 | SIMPLE | mw_revision | ref | rev_page_id,page_timestamp | rev_page_id | 4 | wikidb.mw_page.page_id | 1 | Using index | +----+-------------+-------------+------+----------------------------+-------------+---------+------------------------+------+----------------------------------------------+ 2 rows in set (0.00 sec) It's using temporary and filesorting...
That's why it's marked as expensive :)
(In reply to comment #2) > That's why it's marked as expensive :) Sounds like WORKSFORME than ;-) Please change summary, if you want that special page as "cheap".
(In reply to db from comment #3) > (In reply to comment #2) > > That's why it's marked as expensive :) > > Sounds like WORKSFORME than ;-) > > Please change summary, if you want that special page as "cheap". I'm going to mark this as WONTFIX. The special page is marked as "expensive", and I don't see any obvious way of making the query any cheaper