We have had partial outages (could have been full outages if we didn't have circuit breaking) because of these queries. See P74902 for the slow log details.
The queries scan tens of millions of rows while it can be rewritten to scan only a couple thousands. We have disabled the script to protect the infrastructure
