Answers.Body: <p>I suggest you delete the <code>UI_case_contact_id</code> index as suggested by CiviCRM, and then refresh the system status page. It should then present a button which will automatically add missing indexes.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T14:18:22.253Z
Answers.Text: Thanks Coleman.  Learning here, and learning how to use Stack Ex so this may come to you twice.  I added a screen shot of the Structure.   When I clicked on Drop, I received an error stating:  #1553 - Cannot drop index UI_case_contact_id:   needed in a foreign key constraint.  Is Drop the correct action to take to delete?   How do I get around it?   Thanks
Answers.UserDisplayName: TML100
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-03T20:41:48.633Z
Answers.Text: same issue here.
Answers.UserDisplayName: themak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-22T18:06:14.037Z
Answers.Text: You can disable key constraints before dropping.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T03:38:51.920Z
Answers.LastActivityDate: 2017-09-04T03:38:51.920Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>This SQL query fixed it for me (don't know if SET foreign_key_checks is needed)</p>
  
  <pre><code>SET foreign_key_checks = 0;
  CREATE INDEX `foobar` ON `civicrm`.`civicrm_case_contact` (case_id, contact_id);
  DROP INDEX `UI_case_contact_id` on `civicrm`.`civicrm_case_contact`;
  CREATE UNIQUE INDEX `UI_case_contact_id` ON `civicrm`.`civicrm_case_contact` (case_id, contact_id);
  DROP INDEX `foobar` on `civicrm`.`civicrm_case_contact`;
  SET foreign_key_checks = 1;
  </code></pre>
  
  <p>Source:
  <a href="https://issues.civicrm.org/jira/browse/CRM-20533?focusedCommentId=105725&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-105725" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-20533?focusedCommentId=105725&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-105725</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-11T04:38:36.540Z
Answers.Text: Thanks much...going to give this a try.  My Case_Contact is also empty so hoping for the same result as it looks like you achieved.   Just starting to learn about Civi code at this point...where did you enter these lines?   Thanks again
Answers.UserDisplayName: TML100
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-11T10:58:41.767Z
Answers.Text: @TML100 You can run this SQL query from the [SQL shell](https://dev.mysql.com/doc/refman/5.7/en/connecting.html), or from within phpMyAdmin (SQL button)
Answers.UserDisplayName: Holland Open Source
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-13T20:05:49.463Z
Answers.Text: Thanks Holland  After some research on using phpMyAdmin gave it a try and received Error #1142 Index command denied to user.   But researching that at the host level says I have all possible permissions.  Not expecting you to consider options for that one.  There seems to be a lot of material out there on it, including syntax which I checked.  All of which involve making changes which again I am not experienced enough  to make.   So going to hold off for a while as my DB seems to be functioning ok and the table itself is empty...so it's really only the annoyance of a Performance Warning.
Answers.UserDisplayName: TML100
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-14T07:09:50.423Z
Answers.Text: @TML100 I did it as mysql user "root"
Answers.UserDisplayName: Holland Open Source
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-06T09:48:50.683Z
Answers.LastActivityDate: 2017-09-11T10:59:10.893Z
Answers.LastEditDate: 2017-09-11T10:59:10.893Z
Answers.UserDisplayName: Holland Open Source
Answers.Body: <p>This is hopefully fixed in 4.7.25 - sometime tomorrow it should be downloadable as an rc
  <a href="https://download.civicrm.org/latest" rel="nofollow noreferrer">https://download.civicrm.org/latest</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-06T04:17:20.863Z
Answers.LastActivityDate: 2017-09-06T04:17:20.863Z
Answers.UserDisplayName: user4278
Body: <p>Just upgraded to 4.7.23 and am receiving a Performance Warning: Missing Indices.  </p>
  
  <p>The warning states:  </p>
  
  <p><em>The following tables have an index key with a mismatch in value. Please delete the key indices listed from the below table and then click on 'Update Indices' button.</em></p>
  
  <p>Then the following is listed</p>
  
  <p><strong>Table Name</strong> - civicrm_case_contact</p>
  
  <p><strong>Key Name</strong> - UI_case_contact_id</p>
  
  <p><strong>Fields</strong> - case_id, contact_id</p>
  
  <p>I found the Table in my database with phpMyAdmin. Nested inside are Columns and Indexes. Inside Indexes is what looks like the Key Name of: UI_case_contact_id, and also something labeled: FK_civicrm_case_contact_id.</p>
  
  <p>Will simply deleting UI_case_contact_id resolve this issue?</p>
  
  <p>Or, do I need to delete the Field: FK_civicrm_case_contact_id?</p>
  
  <p>Or is there another approach?</p>
  
  <p>My Civi is definitely slower so looking to see resolving this would help. </p>
  
  <p>Attached an image of the Table from PhpMyAdmin  </p>
  
  <p>Thanks in advance</p>
  
  <p>Tim</p>
  
  <p><a href="https://i.sstatic.net/LlwrV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LlwrV.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/k0dCZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/k0dCZ.png" alt="enter image description here"></a></p>
  
Tags: <upgrade><mysql><performance><indices>
Title: Performance Warning: Missing Indices. Mismatched Index Key
ThreadText: # Performance Warning: Missing Indices. Mismatched Index Key
  
  (Asked by: username_0 on 2017-09-03)
  
  Just upgraded to 4.7.23 and am receiving a Performance Warning: Missing Indices.
  
  The warning states:
  
  *The following tables have an index key with a mismatch in value. Please delete the key indices listed from the below table and then click on 'Update Indices' button.*
  
  Then the following is listed
  
  **Table Name** - civicrm\_case\_contact
  
  **Key Name** - UI\_case\_contact\_id
  
  **Fields** - case\_id, contact\_id
  
  I found the Table in my database with phpMyAdmin. Nested inside are Columns and Indexes. Inside Indexes is what looks like the Key Name of: UI\_case\_contact\_id, and also something labeled: FK\_civicrm\_case\_contact\_id.
  
  Will simply deleting UI\_case\_contact\_id resolve this issue?
  
  Or, do I need to delete the Field: FK\_civicrm\_case\_contact\_id?
  
  Or is there another approach?
  
  My Civi is definitely slower so looking to see resolving this would help.
  
  Attached an image of the Table from PhpMyAdmin
  
  Thanks in advance
  
  Tim
  
  [![enter image description here](https://i.sstatic.net/LlwrV.png)](https://i.sstatic.net/LlwrV.png)
  
  [![enter image description here](https://i.sstatic.net/k0dCZ.png)](https://i.sstatic.net/k0dCZ.png)
  
  **Tags:** upgrade, mysql, performance, indices
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2017-09-04. Score: 2
  
  I suggest you delete the `UI_case_contact_id` index as suggested by CiviCRM, and then refresh the system status page. It should then present a button which will automatically add missing indexes.
  
  > **Comments:**
  > **username_0**: Thanks username_1.  Learning here, and learning how to use Stack Ex so this may come to you twice.  I added a screen shot of the Structure.   When I clicked on Drop, I received an error stating:  #1553 - Cannot drop index UI_case_contact_id:   needed in a foreign key constraint.  Is Drop the correct action to take to delete?   How do I get around it?   Thanks  
  > **username_2**: same issue here.  
  > **username_1**: You can disable key constraints before dropping.  
  
  ---
  
  ### Answer by username_3 on 2017-09-06. Score: 1
  
  This SQL query fixed it for me (don't know if SET foreign\_key\_checks is needed)
  
  ```
  SET foreign_key_checks = 0;
  CREATE INDEX `foobar` ON `civicrm`.`civicrm_case_contact` (case_id, contact_id);
  DROP INDEX `UI_case_contact_id` on `civicrm`.`civicrm_case_contact`;
  CREATE UNIQUE INDEX `UI_case_contact_id` ON `civicrm`.`civicrm_case_contact` (case_id, contact_id);
  DROP INDEX `foobar` on `civicrm`.`civicrm_case_contact`;
  SET foreign_key_checks = 1;
  
  ```
  
  username_3:
  <https://issues.civicrm.org/jira/browse/CRM-20533?focusedCommentId=105725&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-105725>
  
  > **Comments:**
  > **username_0**: Thanks much...going to give this a try.  My Case_Contact is also empty so hoping for the same result as it looks like you achieved.   Just starting to learn about Civi code at this point...where did you enter these lines?   Thanks again  
  > **username_3**: @username_0 You can run this SQL query from the [SQL shell](https://dev.mysql.com/doc/refman/5.7/en/connecting.html), or from within phpMyAdmin (SQL button)  
  > **username_0**: Thanks username_3  After some research on using phpMyAdmin gave it a try and received Error #1142 Index command denied to user.   But researching that at the host level says I have all possible permissions.  Not expecting you to consider options for that one.  There seems to be a lot of material out there on it, including syntax which I checked.  All of which involve making changes which again I am not experienced enough  to make.   So going to hold off for a while as my DB seems to be functioning ok and the table itself is empty...so it's really only the annoyance of a Performance Warning.  
  > **username_3**: @username_0 I did it as mysql user "root"  
  
  ---
  
  ### Answer by username_4 on 2017-09-06. Score: 1
  
  This is hopefully fixed in 4.7.25 - sometime tomorrow it should be downloadable as an rc
  <https://download.civicrm.org/latest>
  
  
  ---
  
  