Acivity tab timing out after 5.70 upgrade on large DB
The admin_ui version of the activity tab is generating queries for some CIDs that don't return in a reasonable amount of time. EXPLAIN shows that filesort is being used for the first subquery.
One example query, generated for a contact with only 18 activities: https://phabricator.wikimedia.org/P55961 Wikimedia's tracking task, with the SQL query explain: https://phabricator.wikimedia.org/T356269
Oddly, I WAS able to load the activities tab for my own user which has 700+ activities, so it's not just related to the number of activities on a contact.
If I just roll back 04078d359e298a5a02ea274404dcdb8af83225dd it restores the previous activity tab and I can load the CID's activity tab fine with no runaway query generated.