This is showing up in log of really slow queries: https://logstash.wikimedia.org/app/discover#/doc/logstash-*/logstash-mediawiki-1-7.0.0-1-2022.10.08?id=I8C3toMBp2kibf73MYW3
The query is not that bad but clearly lacks the index hint core's db query has.
Generally the whole query making in SpecialMobileHistory needs rework (using query builder etc.)
For example https://en.wikipedia.org/wiki/Special:History/Wikipedia:Requests_for_page_protection is quite slow and can easily bring down databases.