Answers.Body: <p>If you don't need the logs, you could delete them.</p>
  
  <p>Which engine are your log tables using?  There is a useful article by Eileen about ARCHIVE vs INNODB: <a href="https://civicrm.org/blog/eileen/who-did-what-when" rel="nofollow noreferrer">https://civicrm.org/blog/eileen/who-did-what-when</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-12T18:32:28.587Z
Answers.Text: We are using ARCHIVE, but I did not consciously choose that. CiviCRM must set that by default?  Thanks for the suggestion.
Answers.UserDisplayName: Zachary
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-12T19:19:30.717Z
Answers.Text: ARCHIVE was the old standard.  New sites use INNODB but old sites are not automatically changed from ARCHIVE tables.  The article shows how you can manually switch over.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-12T21:49:28.900Z
Answers.Text: any tips on step 3? 
  3) existing sites can migrate to the new log_conn_id by running an api function (probably by drush or similar) civicrm_api3('System', 'updatelogtables', array());
Answers.UserDisplayName: Zachary
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-14T05:02:04.357Z
Answers.Text: Install this https://github.com/eileenmcnaughton/nz.co.fuzion.innodbtriggers/ before running the api function - you can run it through api explorer if you want - or via drush or similar https://docs.civicrm.org/dev/en/latest/api/
Answers.UserDisplayName: user4278
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-12T18:25:56.873Z
Answers.LastActivityDate: 2018-06-12T18:25:56.873Z
Answers.UserDisplayName: Aidan
Body: <p>CiviCRM 4.7.31 (upgrading today) Drupal 7.x</p>
  
  <p>Our log_civicrm_group table crashed and needed repair. We had to run the repair twice from the command line for it to actually work. It's about 850MB large now. When we click the "log" tab on some contact records we're seeing some timeouts or some extremely long load times. It should also be noted we're using a MailChimp extension and there is extensive use of groups.</p>
  
  <p>Does anyone have a suggestion for keeping these log tables at sane sizes (archiving?) or optimizing mysql to present them quicker despite their size? </p>
  
  <p>Thank you for any suggestions. We just enabled the feature and didn't think about what to do after collecting a year of logs. </p>
  
Tags: <logging><db-logging>
Title: Large CiviCRM Logs
ThreadText: # Large CiviCRM Logs
  
  (Asked by: username_0 on 2018-06-12)
  
  CiviCRM 4.7.31 (upgrading today) Drupal 7.x
  
  Our log\_civicrm\_group table crashed and needed repair. We had to run the repair twice from the command line for it to actually work. It's about 850MB large now. When we click the "log" tab on some contact records we're seeing some timeouts or some extremely long load times. It should also be noted we're using a MailChimp extension and there is extensive use of groups.
  
  Does anyone have a suggestion for keeping these log tables at sane sizes (archiving?) or optimizing mysql to present them quicker despite their size?
  
  Thank you for any suggestions. We just enabled the feature and didn't think about what to do after collecting a year of logs.
  
  **Tags:** logging, db-logging
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-06-12. Score: 4
  
  If you don't need the logs, you could delete them.
  
  Which engine are your log tables using? There is a useful article by Eileen about ARCHIVE vs INNODB: <https://civicrm.org/blog/eileen/who-did-what-when>
  
  > **Comments:**
  > **username_0**: We are using ARCHIVE, but I did not consciously choose that. CiviCRM must set that by default?  Thanks for the suggestion.  
  > **username_1**: ARCHIVE was the old standard.  New sites use INNODB but old sites are not automatically changed from ARCHIVE tables.  The article shows how you can manually switch over.  
  > **username_0**: any tips on step 3?  3) existing sites can migrate to the new log_conn_id by running an api function (probably by drush or similar) civicrm_api3('System', 'updatelogtables', array());  
  > **username_2**: Install this https://github.com/eileenmcnaughton/nz.co.fuzion.innodbtriggers/ before running the api function - you can run it through api explorer if you want - or via drush or similar https://docs.civicrm.org/dev/en/latest/api/  
  
  ---
  
  