Following {T363633}, any query against logging, logging_userindex and logging_logindex and filtered by log_action and/or log_title and log_namespace are incredibly slow.
SELECT log_action, log_timestamp, log_params FROM `enwiki_p`.`logging_logindex` WHERE log_type = 'block' AND log_action IN ('block', 'reblock', 'unblock') AND log_timestamp > 0 AND log_title = 'GoldenRing' AND log_namespace = 2 ORDER BY log_timestamp ASC
This used to be very fast, now the query plan looks like:
select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
SIMPLE | logging | ref | log_type_action, log_type_time, log_times | log_type_action | 34 | const | 52360612 | Using index condition; Using where; Using filesort |