API: Use rev_user when possible for list=usercontribs
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 28 Mar 2016 20:20:24 +0000 (16:20 -0400)
committerAnomie <bjorsch@wikimedia.org>
Fri, 15 Jul 2016 19:31:23 +0000 (19:31 +0000)
commit2cf38c72af585b49d28a49bfdc6f0140ad6e4675
tree890aa3fc7aeee1d339c3a9499cd27df862c6bcb8
parentee71c2658eb8388039248010bfc99b0ca90d5c34
API: Use rev_user when possible for list=usercontribs

When all ucusers are registered users, we can do it somewhat more
efficiently by querying by rev_user instead of rev_user_text. This
should particularly make a difference on the WMF cluster where the
revision table is clustered by rev_user on the relevant slaves.

This also kills the forcing of the usertext_timestamp index in the
query. MySQL should be smart enough these days to not need that.

Bug: T131065
Change-Id: Ie8317ea15937f98133d4c1b69315c35aa2e046fa
includes/api/ApiQueryUserContributions.php