Also note that I have a similar query that kind of works but takes much longer to complete then it used to.
https://quarry.wmflabs.org/query/41680

Executed in 46.22 seconds as of Wed Jan 29 2020.
Resultset (1480 rows)

Executed in 188.32 seconds as of Wed Apr 15 2020.
Resultset (1480 rows)

So thats about 4 times longer then before on the same data. Well actor table is probably longer, but I assume this will use indexes: `LEFT JOIN actor a ON actor_id = log_actor`.

Cheers,
Nux.

Maciej Jaros (2020-04-15 23:56):
Not sure if this is an appropriate place to discuss this but I'm not able to run this query:
https://quarry.wmflabs.org/query/24267

Even a minor part of this query like below needs a significant time to complete.
   SELECT count(*) as review_count, log_actor
    FROM logging
    WHERE log_type = 'review' AND log_action = 'approve'
    GROUP BY log_actor

I tried with logging_userindex but that don't seem to help. Any chances on adding extra indexes to make such queries work? I think querying log_type and log_actor should be quite common for various user stats.

Even this takes almost 200 seconds to complete:
    SELECT count(*) as review_count, log_actor
    FROM logging_userindex
    WHERE log_type = 'review' AND log_action = 'approve'
    AND log_timestamp >= 20190101000000
    AND log_timestamp <= 20190101235959
    GROUP BY log_actor

Also note that the query
24267 used to work in January 2020. I searched through the list, but haven't found any changes related to the logging table since January.

Cheers,
Nux.

_______________________________________________
Wikimedia Cloud Services mailing list
Cloud@lists.wikimedia.org (formerly labs-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/cloud