Summary
The Special:GlobalContributions page allows lookups for accounts. This query is performed on the cu_changes table, but does not need to be because we do not need any data from that table. Querying the revision table instead should be faster.
Background
- Special:GlobalContributions allows lookups of global contributions from named accounts, temporary accounts, and all contributions by temporary accounts on a given IP address or range
- All lookup types but the last are very similar to Special:Contributions but instead is global.
- When looking up for account contributions we don't need to get any private data, such as the IP address, to assist in the lookups
- Adding JOINs to the query which are not necessary will likely cause a slower query, which we want to avoid when performing this query on potentially 20 wikis at a time
- Therefore, querying the revision table directly should help in avoiding these issues
- This also helps to solve T387746: Null edits (recording e.g., page moves/protections/imports) do not appear to be displayed in Special:GlobalContributions for all but the last lookup type, because cu_changes does not store this data but the revision table will
Acceptance criteria
- Query performed by Special:GlobalContributions only uses cu_changes table if the lookup requires using that table, otherwise uses the revision table