Page MenuHomePhabricator

[M] MachineVision\Repository::getUnreviewedImageCountForUser has a suboptimal query loading more than 10,000 rows
Closed, ResolvedPublic

Description

It is showing up in our list of bad queries and it seems it's doing something programmatically that can be easily done in the query itself. Group it by mvl_review and have it count(*).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
CBogen renamed this task from MachineVision\Repository::getUnreviewedImageCountForUser has a suboptimal query loading more than 10,000 rows to [M] MachineVision\Repository::getUnreviewedImageCountForUser has a suboptimal query loading more than 10,000 rows.Mar 9 2022, 5:23 PM

Change 801427 had a related patch set uploaded (by Seddon; author: Seddon):

[mediawiki/extensions/MachineVision@master] Optimise getUnreviewedImageCountForUser

https://gerrit.wikimedia.org/r/801427

Change 801427 merged by jenkins-bot:

[mediawiki/extensions/MachineVision@master] Optimise getUnreviewedImageCountForUser

https://gerrit.wikimedia.org/r/801427

Etonkovidova subscribed.

Checked in logstash for wmf.2 - the dashboard Slow queries mediawiki database doesn't list the reported query.