First thought, filter the timestamp first, then user groups.
On Wed, Oct 28, 2015 at 2:44 PM, Yetkin Sakal <[email protected]> wrote:
> user_daily_contribs having been dropped, I am facing serious problems
> about a query. How to optimize this?
>
> SELECT
> u.user_name,
> COUNT(rev.rev_id) AS contribs
> FROM
> user u
> INNER JOIN user_groups ug
> ON u.user_id = ug.ug_user
> INNER JOIN revision_userindex rev
> ON rev.rev_user = u.user_id
> WHERE
> ug.ug_group IN ('sysop', 'bureaucrat', 'checkuser', 'oversight')
> AND rev.rev_timestamp >= 20150928000000
> GROUP BY
> u.user_name
>
>
> _______________________________________________
> Labs-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/labs-l
>
>
_______________________________________________
Labs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/labs-l