Looking at slow queries on tendril, I noticed some queries like the following show up several times:
SELECT * FROM `abuse_filter_log` LEFT JOIN `abuse_filter` ON ((af_id=afl_filter)) WHERE (afl_actions = 'block' OR (afl_actions LIKE 'block, %' ESCAPE '`' ) OR (afl_actions LIKE '%, block' ESCAPE '`' ) OR (afl_actions LIKE '%, block, %' ESCAPE '`' )) AND ((afl_deleted = '0') OR (afl_deleted IS NULL)) ORDER BY afl_timestamp DESC LIMIT 51
SELECT * FROM `abuse_filter_log` LEFT JOIN `abuse_filter` ON ((af_id=afl_filter)) WHERE afl_action = 'stashupload' AND ((afl_deleted = '0') OR (afl_deleted IS NULL)) ORDER BY afl_timestamp DESC LIMIT 51
(basically just grep AbuseLogPager to find them).
On large wikis (=enwiki, and sometimes commons), these queries can take up to 80 seconds. I wonder if there's something we can do to optimize them without adding any index. Or add them if it needs be: I guess one on (afl_action, afl_timestamp) and one on (afl_actions,afl_timestamp). Performance should be evaluated then.