Last modified: 2014-02-26 11:40:19 UTC
I noticed the following query running on an enwiki slave for 10 minutes, before I killed it. See in the explain: mysql> explain SELECT /* ApiQueryArticleFeedback::getUserRatings 142.155.15.205 */ aa_rating_id,aa_revision,aa_rating_value FROM `article_feedback` WHERE aa_page_id = '30902154' AND aa_rating_id IN ('1','2','3','4') AND aa_user_id = '0' AND aa_user_text = '142.155.15.205' AND aa_user_anon_token = 'WA5aPep9ImRrfAO4iKJiQkckv1O6fcDG' ORDER BY aa_revision DESC LIMIT 4; +----+-------------+------------------+-------+----------------------------------+---------+---------+------+---------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------------+-------+----------------------------------+---------+---------+------+---------+-------------+ | 1 | SIMPLE | article_feedback | index | aa_user_page_revision,aa_page_id | PRIMARY | 299 | NULL | 9725137 | Using where | +----+-------------+------------------+-------+----------------------------------+---------+---------+------+---------+-------------+ 1 row in set (0.00 sec) It would probably be nice if there was an index on aa_user_text, but this query specifies a single aa_page_id and forcing that drops the examined rows lots: mysql> explain SELECT /* ApiQueryArticleFeedback::getUserRatings 142.155.15.205 */ aa_rating_id,aa_revision,aa_rating_value FROM `article_feedback` USE INDEX (aa_page_id) WHERE aa_page_id = '30902154' AND aa_rating_id IN ('1','2','3','4') AND aa_user_id = '0' AND aa_user_text = '142.155.15.205' AND aa_user_anon_token = 'WA5aPep9ImRrfAO4iKJiQkckv1O6fcDG' ORDER BY aa_revision DESC LIMIT 4; +----+-------------+------------------+------+---------------+------------+---------+-------+-------+-----------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------------+------+---------------+------------+---------+-------+-------+-----------------------------+ | 1 | SIMPLE | article_feedback | ref | aa_page_id | aa_page_id | 4 | const | 22936 | Using where; Using filesort | +----+-------------+------------------+------+---------------+------------+---------+-------+-------+-----------------------------+ 1 row in set (0.01 sec) and the actual query run: mysql> SELECT /* ApiQueryArticleFeedback::getUserRatings 142.155.15.205 */ aa_rating_id,aa_revision,aa_rating_value FROM `article_feedback` USE INDEX (aa_page_id) WHERE aa_page_id = '30902154' AND aa_rating_id IN ('1','2','3','4') AND aa_user_id = '0' AND aa_user_text = '142.155.15.205' AND aa_user_anon_token = 'WA5aPep9ImRrfAO4iKJiQkckv1O6fcDG' ORDER BY aa_revision DESC LIMIT 4; Empty set (1.04 sec)
I've added an index (and removed an unused one) in r110967, that would fix this issue, right? I've also added it to the list of schema changes in the Etherpad.
The extension homepage at [[mw:Extension:ArticleFeedback]] says "This extension has been archived. This extension has not been maintained in some time, and no longer supports recent releases of MediaWiki. The following other choices are still available: [[mw:Extension:ArticleFeedbackv5]]" Furthermore, ArticleFeedback (version 4 or earlier) was removed from all Wikimedia wikis in https://gerrit.wikimedia.org/r/#/c/98074/ It is currently unlikely that there will be any further active development of ArticleFeedback (version 4 or earlier). Closing this report as WONTFIX to reflect reality. Please feel free to reopen this report in the future if anyone takes the responsibility for active development of ArticleFeedback (version 4 or earlier) again. Thank you for reporting this bug and we are sorry it could not be fixed.