Page MenuHomePhabricator

Slow query on live triggered by user dedupe
Closed, DuplicatePublic

Description

Anna (DS) triggered a slow query which cause queue failure (And would have degraded user experience if not detected & killed)

Copying to tmp table on disk | INSERT INTO dedupe (id1, id2, weight) SELECT t1.contact_id id1, t2.contact_id id2, 50 weight FROM civicrm_email t1 JOIN civicrm_email t2 USING (email) WHERE t1.contact_id < t2.contact_id AND t1.email IS NOT NULL AND t1.email <> '' GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)

I'm unsure what actions she did that bypassed my efforts to make that impossible. @MBeat33 if you find out can you update on here

Event Timeline

@MBeat33 said that this was caused when she did a merge & then cancelled (after doing another merge)

I spoke with Natalie about the more recent instance of this, and the only unusual things she may have done when merging were using the back button on the browser, and using the Flip between original and duplicate contacts button more than once before a merge.

I tested this just now by merging cid=20059738 into cid=20005471, liberally clicking both 'back' and 'flip' before finishing the merge.