Answers.Body: <p>It might well be natural to have that many log records as they reflect changes that have been made to the fields. So if a field gets a new label or a new option, that would be reflected in the log tables.</p>
  
  <p>You can disable the overall logging (Administer>System Settings>Misc) if you do not need it. It is not required to make CiviCRM run.</p>
  
  <p>You can also elect to keep logging switched on but empty the logging tables regularly? You have to do that in the database, there is no user interface to empty the logging tables.</p>
  
  <p>It could well be however that you switch off logging and your problem persists because that is not the root of the problem? I have so far not experienced the size of the logging tables leading to this behaviour, even with millions of records in it. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-25T17:25:48.373Z
Answers.Text: The issue was not due to the log table, as it still appears even after the log table is cleared. The issue happens when I try to create a new Custom field this way - I gave "alpha numeric" in the first drop down and "select" in the second dropdown under "Data and Input Field Type". Then I scrolled down and checked the "Is this field Searchable" checkbox. Then Save the field and the screen gets freeze (the cursor keeps rotating and it wont save the data). Now the database gets corrupted and I get an error when I open any contact. This happens only if the "Is this field Searchable" is checked.
Answers.UserDisplayName: R John
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-25T17:48:18.417Z
Answers.Text: @RJohn what version of Civi are you using?
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-26T16:04:36.383Z
Answers.Text: @Aidan The version is CiviCRM 5.6.0.
Answers.UserDisplayName: R John
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-25T12:55:01.783Z
Answers.LastActivityDate: 2019-01-25T12:55:01.783Z
Answers.UserDisplayName: ErikH - CiviCooP
Body: <p>I am having issues when working with Custom fields, that the CRM gets frozen, and have to restart everything. Today I noticed that the MySQL table log_civicrm_custom_field has nearly 140K rows, while I have less than 400 custom fields only. There are hundreds of duplicated rows for each of the custom field, with the same id repeated but different log_date and log_conn_id. Is it natural to have this many log records, can we disable this logging? Or is there a way to clear some of these rows, so that the CRM works faster.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-25T13:53:38.603Z
Comments.Text: See also https://civicrm.stackexchange.com/questions/25318/large-civicrm-logs. Not sure if it's an exact duplicate question but is similar.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-12T18:59:24.600Z
Comments.Text: I am also running into a similar issue where the screen freezes, the cursor keeps rotating and the data won't save when unpublishing an event, editing activities, and disabling relationships on v 5.10.3. Does anyone have an explanation/solution?
Comments.UserDisplayName: Rdarris
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-12T22:30:47.157Z
Comments.Text: Hi Rdarris, you've posted this as an answer, but this looks more like a question.  You are more likely to get a response if you ask a new question.
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-28T20:43:59.743Z
Comments.Text: This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://civicrm.stackexchange.com/questions/ask). You can also [add a bounty](https://civicrm.stackexchange.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](https://civicrm.stackexchange.com/help/whats-reputation). - [From Review](/review/low-quality-posts/8726)
Comments.UserDisplayName: themak
Tags: <custom-fields>
Title: Custom Fields Table
ThreadText: # Custom Fields Table
  
  (Asked by: username_0 on 2019-01-25)
  
  I am having issues when working with Custom fields, that the CRM gets frozen, and have to restart everything. Today I noticed that the MySQL table log\_civicrm\_custom\_field has nearly 140K rows, while I have less than 400 custom fields only. There are hundreds of duplicated rows for each of the custom field, with the same id repeated but different log\_date and log\_conn\_id. Is it natural to have this many log records, can we disable this logging? Or is there a way to clear some of these rows, so that the CRM works faster.
  
  **Tags:** custom-fields
  
  > **Comments:**
  > **username_1**: See also https://civicrm.stackexchange.com/questions/25318/large-civicrm-logs. Not sure if it's an exact duplicate question but is similar.  
  > **username_2**: I am also running into a similar issue where the screen freezes, the cursor keeps rotating and the data won't save when unpublishing an event, editing activities, and disabling relationships on v 5.10.3. Does anyone have an explanation/solution?  
  > **username_3**: Hi username_2, you've posted this as an answer, but this looks more like a question.  You are more likely to get a response if you ask a new question.  
  > **username_4**: This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://civicrm.stackexchange.com/questions/ask). You can also [add a bounty](https://civicrm.stackexchange.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](https://civicrm.stackexchange.com/help/whats-reputation). - [From Review](/review/low-quality-posts/8726)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_5 on 2019-01-25. Score: 3 | Accepted answer
  
  It might well be natural to have that many log records as they reflect changes that have been made to the fields. So if a field gets a new label or a new option, that would be reflected in the log tables.
  
  You can disable the overall logging (Administer>System Settings>Misc) if you do not need it. It is not required to make CiviCRM run.
  
  You can also elect to keep logging switched on but empty the logging tables regularly? You have to do that in the database, there is no user interface to empty the logging tables.
  
  It could well be however that you switch off logging and your problem persists because that is not the root of the problem? I have so far not experienced the size of the logging tables leading to this behaviour, even with millions of records in it.
  
  > **Comments:**
  > **username_0**: The issue was not due to the log table, as it still appears even after the log table is cleared. The issue happens when I try to create a new Custom field this way - I gave "alpha numeric" in the first drop down and "select" in the second dropdown under "Data and Input Field Type". Then I scrolled down and checked the "Is this field Searchable" checkbox. Then Save the field and the screen gets freeze (the cursor keeps rotating and it wont save the data). Now the database gets corrupted and I get an error when I open any contact. This happens only if the "Is this field Searchable" is checked.  
  > **username_6**: @RJohn what version of Civi are you using?  
  > **username_0**: @username_6 The version is CiviCRM 5.6.0.  
  
  ---
  
  