CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade of civicrm_activity table
Pages: [1]

Author Topic: Upgrade of civicrm_activity table  (Read 663 times)

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Upgrade of civicrm_activity table
August 19, 2010, 04:49:39 am
Wow. CiviCRM 3.2.1 (from 2.2.9) has been upgrading for the last hour. Almost all of that time has been queries of this form -

Code: [Select]
UPDATE civicrm_activity_target cat, civicrm_activity ca
                    SET cat.activity_id = 542639  
                WHERE ca.source_record_id IS NOT NULL   AND
                      ca.activity_type_id = 32          AND
                      ca.id <> 542639              AND
                      ca.source_record_id = 1020 AND
                      ca.id = cat.activity_id

Code: [Select]
DELETE ca.*
                FROM civicrm_activity ca
                WHERE ca.source_record_id IS NOT NULL  AND
                      ca.activity_type_id = 32         AND
                      ca.id <> 542639             AND
                      ca.source_record_id = 1020

It actually seems to be the DELETE which is slow.

civicrm_activity has only 1.3million rows, 2.5GHz core2, 2GB RAM on the VM. From ca.id there I'd guesstimate up to another hour to go.
« Last Edit: August 19, 2010, 04:54:45 am by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Upgrade of civicrm_activity table
August 19, 2010, 04:04:16 pm
It took just over three hours in the end.
@xurizaemon ● www.fuzion.co.nz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade of civicrm_activity table

This forum was archived on 2017-11-26.