Page MenuHomePhabricator

Slow query: dedupe script
Open, Needs TriagePublic1 Estimated Story Points

Description

In analysing slow queries for T152786 I realised that the query to determine how backed up the contribution queue is could be much quicker. The query counts the number of contacts with a creation date greater than x (eg 4 minutes ago). However, it turns out created_date is not indexed & the query takes around 10 seconds. I think I could get it down to 1 by getting the created_date of max(id) - threshold and then comparing it to 4 minutes ago.

10 seconds is not horrifically slow but it stood out as it is frequent. On one occasion the query was much slower - presumably because of other stuff going on. There was one other frequent query that takes 12 seconds - on the thank you job

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 13 2016, 9:24 PM
Eileenmcnaughton set the point value for this task to 1.Dec 13 2016, 9:35 PM
Aklapper removed Eileenmcnaughton as the assignee of this task.Jun 19 2020, 4:15 PM

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)