https://bugzilla.wikimedia.org/show_bug.cgi?id=58256

       Web browser: ---
            Bug ID: 58256
           Summary: IndexPager::buildQueryInfo (NewPagesPager) query needs
                    tuning
           Product: MediaWiki
           Version: 1.23-git
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: Unprioritized
         Component: Database
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: sprin...@wikimedia.org
    Classification: Unclassified
   Mobile Platform: ---

The following query is much slower on MariaDB enwiki with the FORCE INDEX than
without it:

SELECT /* IndexPager::buildQueryInfo (NewPagesPager) xxx.xxx.xxx.xxx */
rc_namespace, rc_title, rc_cur_id, rc_user, rc_user_text, rc_comment,
rc_timestamp, rc_patrolled, rc_id, rc_deleted, page_len AS length, page_latest
AS rev_id, rc_this_oldid, page_namespace, page_title, fp_stable,
fp_pending_since, (SELECT GROUP_CONCAT(ct_tag SEPARATOR ', ') FROM `change_tag`
WHERE ct_rc_id=rc_id ) AS ts_tags FROM `recentchanges` FORCE INDEX
(new_name_timestamp) INNER JOIN `page` ON ((page_id=rc_cur_id)) LEFT JOIN
`flaggedpages` ON ((fp_page_id = rc_cur_id)) WHERE rc_new = '1' AND
(rc_namespace != '6') AND page_is_redirect = '0' ORDER BY rc_timestamp DESC
LIMIT 51;

With force: > 1min, ~500000 rows hit with a filesort.

Without force: < 1ses, ~100 rows hit using rc_timestamp, no filesort.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to