Merging Account records takes a long time and never finishes

Hi everyone

Would anyone know why is merging is not finishing? I don't understand why there are so many link requests relating to activities and if this is even important? This seems to go on for a very long time and merging never completes. 

Can anyone suggest a solution to this, please?

Thanks

Parents
  • Hi sonesay inthavong,

    Activities can add up! They are the content of the Activity Stream, and they record every audited change in every record of every module.

    You can learn a lot about this directly in the database (or through Advanced Reports):

    1. How many rows are in your activities and activities_users tables?

    SELECT COUNT(*) FROM activities;

    SELECT COUNT(*) FROM activities_users;

    2. How many rows are related to the Accounts involved in the merge?

    SELECT * FROM activities WHERE parent_type = 'Accounts' AND parent_id IN ('<accounts.id>','<accounts.id>');

    Where <accounts.id> represent the Account IDs of the accounts involved in your merger.

    If there are a lot, this could result in the errors you have described. Deleting historical activity records can greatly improve performance of your application.

    Note: When merging, multiple records across multiple modules can be effected because a merger re-relates records in other modules that are related to the account(s) deleted by the merger to now relate to the account that the other account(s) are being merged into. Merging also therefore adds activities for all of those changes.

    One way to reduce the scale of a merger is to perform the re-relating manually. Knowing which account you intend to keep, change the relations of related records before performing the merger.

    I hope this helps!

Reply
  • Hi sonesay inthavong,

    Activities can add up! They are the content of the Activity Stream, and they record every audited change in every record of every module.

    You can learn a lot about this directly in the database (or through Advanced Reports):

    1. How many rows are in your activities and activities_users tables?

    SELECT COUNT(*) FROM activities;

    SELECT COUNT(*) FROM activities_users;

    2. How many rows are related to the Accounts involved in the merge?

    SELECT * FROM activities WHERE parent_type = 'Accounts' AND parent_id IN ('<accounts.id>','<accounts.id>');

    Where <accounts.id> represent the Account IDs of the accounts involved in your merger.

    If there are a lot, this could result in the errors you have described. Deleting historical activity records can greatly improve performance of your application.

    Note: When merging, multiple records across multiple modules can be effected because a merger re-relates records in other modules that are related to the account(s) deleted by the merger to now relate to the account that the other account(s) are being merged into. Merging also therefore adds activities for all of those changes.

    One way to reduce the scale of a merger is to perform the re-relating manually. Knowing which account you intend to keep, change the relations of related records before performing the merger.

    I hope this helps!

Children