User merge/delete slow since notes consolidation fix

Bug #1960956 reported by Chris Sharp
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned

Bug Description

Found on PINES production running Evergreen 3.8.0.

Merging a user in 3.6 was basically instantaneous, but since our upgrade to Evergreen 3.8.0, we've seen very long delays in merging patrons. Analysis of the DB functions led to slowness in this line in actor.usr_purge_data:

UPDATE actor.usr_message SET editor = dest_usr WHERE editor = src_usr;

EXPLAIN revealed a seq scan on the actor.usr_message table, which is very large in PINES.

After taking a look at actor.usr_message, I realized we are missing an index on the "editor" column.

Branch adding that index on the way.

To fix in a running production system, run the following command:

CREATE INDEX CONCURRENTLY aum_editor ON actor.usr_message (editor);

Revision history for this message
Chris Sharp (chrissharp123) wrote :
tags: added: database pullrequest
Changed in evergreen:
assignee: Chris Sharp (chrissharp123) → nobody
Changed in evergreen:
milestone: none → 3.8.1
Revision history for this message
Terran McCanna (tmccanna) wrote :

Noting that PINES has this in production and it has helped significantly.

Bill Erickson (berick)
Changed in evergreen:
assignee: nobody → Bill Erickson (berick)
Revision history for this message
Bill Erickson (berick) wrote :

Looks good. Merged to 3.8 / master.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.