Answers.Body: <p>This problem has been raised before and you can view the thread at <a href="https://civicrm.stackexchange.com/questions/18487/how-to-find-and-or-fix-missing-indices">How to find and/or fix missing indices?</a></p>
  
  <p>There is also an entry in JIRA at the <a href="https://issues.civicrm.org/jira/projects/CRM/issues/CRM-20533?filter=allissues" rel="nofollow noreferrer">following link</a> <a href="https://issues.civicrm.org/jira/projects/CRM/issues/CRM-20533?filter=allissues" rel="nofollow noreferrer">https://issues.civicrm.org/jira/projects/CRM/issues/CRM-20533?filter=allissues</a></p>
  
  <p>Hope this helps.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-25T16:05:06.790Z
Answers.Text: I, too, got the Missing Indices Performance Warning on Wordpress 4.8 when upgrading to 4.7.22 (testing out on my local XAMPP instance before going live). I thought that maybe upgrading from 4.16 was too much of a stretch, so I then just upgraded to 4.7.19. Same issue as documented here and in a few other posts. Are we OK if we just ignore this warning (orange instead of red) and wait for a further Civi update that should fix everything? I don't quite follow exactly what to do if I really must repair the DB before going live.
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-25T17:06:48.410Z
Answers.Text: FYI - my error was: "Operation failed: Update Indices
  DB Error: already exists
  Debug information:
  CREATE UNIQUE INDEX UI_case_contact_id ON civicrm_case_contact (case_id, contact_id) [nativecode=1061 ** Duplicate key name 'UI_case_contact_id']"  I then looked at JIRA CRM-20533 and saw a suggested SQL query to remove and re-create UI_contact_id. Note that table is empty for me and the suggested JIRA repair doesn't fix things.
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-25T18:05:50.917Z
Answers.Text: I was able to execute steps 3-5 on our local Civi instance (including the error recovery suggestions) in https://civicrm.stackexchange.com/questions/18487/how-to-find-and-or-fix-missing-indices. I would still like to know if this is even necessary as I don't have MySQL root on our live instance and it's a bit klunky to export/import back/forth from live to local versions, although I can do it.
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T17:31:48.213Z
Answers.LastActivityDate: 2017-07-10T19:16:19.963Z
Answers.LastEditDate: 2017-07-10T19:16:19.963Z
Answers.UserDisplayName: peterb
Answers.Body: <p>You can execute run indices under system status, and tail the CiviCRM log for any exceptions during the process (such as rebuilding the foreign keys).</p>
  
  <p>I had a few fatal errors, so the process would never complete due to existing foreign key constraints in the DB. Idid a MySQL dump of the DB and commented out the offending foreign keys which were then recreated by the CiviCRM update indices process.</p>
  
  <p>Unfortunately can't grab the URL directly because it has been run. I could check your Javascript console in the browser to see why the status page isn't loading. I believe it does an AJAX request to populate the status page.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T19:53:49.170Z
Answers.LastActivityDate: 2017-07-10T19:53:49.170Z
Answers.UserDisplayName: Adam
Body: <p>I successfully upgraded to CiviCRM 4.7.21 (from 4.7.17), and everything seems to be working properly. However, I got a critical status error, "Performance warning: Missing indices". After reading <a href="https://civicrm.stackexchange.com/questions/18487/">How to find and/or fix missing indices?</a> I tried bringing up the status screen to correct the error, but the status screen comes up empty. However, I continue to see "System Status Critical" highlighted in pink near the top of the screen.  (See screenshot below.)</p>
  
  <p><a href="https://i.sstatic.net/ZR0uh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZR0uh.png" alt="System Status Critical"></a></p>
  
  <p>I downloaded the latest log from /wp-content/uploads/civicrm/ConfigAndLog, but I don't see anything relating to indices in it. (Log included below.)</p>
  
  <p>Any ideas where to go from here?</p>
  
  <pre><code>Jul 09 15:58:28  [info] Running task: Cleanup old files
  
  Jul 09 15:58:29  [info] Running task: Begin Upgrade to 4.7.18
  
  Jul 09 15:58:30  [info] Running task: Upgrade DB to 4.7.18
  
  Jul 09 15:58:31  [info] Running task: Update Kenyan Provinces
  
  Jul 09 15:58:31  [info] Running task: Upgrade DB to 4.7.18: SQL
  
  Jul 09 15:58:32  [info] Running task: Finish Upgrade DB to 4.7.18
  
  Jul 09 15:58:33  [info] Running task: Begin Upgrade to 4.7.19
  
  Jul 09 15:58:34  [info] Running task: Upgrade DB to 4.7.19
  
  Jul 09 15:58:34  [info] Running task: Drop Column current_period_opening_balance From civicrm_financial_account table.
  
  Jul 09 15:58:35  [info] Running task: Drop Column opening_balance From civicrm_financial_account table.
  
  Jul 09 15:58:36  [info] Running task: CRM-19961 - Add domain_id column to civicrm_sms_provider
  
  Jul 09 15:58:37  [info] Running task: CRM-19961 - Populate domain id table and perhaps add foreign key
  
  Jul 09 15:58:37  [info] Running task: Upgrade DB to 4.7.19: SQL
  
  Jul 09 15:58:38  [info] Running task: CRM-16633 - Add "Change Case Subject" activity
  
  Jul 09 15:58:39  [info] Running task: Add is_public column to civicrm_custom_group
  
  Jul 09 15:58:40  [info] Running task: Finish Upgrade DB to 4.7.19
  
  Jul 09 15:58:41  [info] Running task: Begin Upgrade to 4.7.20
  
  Jul 09 15:58:41  [info] Running task: Upgrade DB to 4.7.20
  
  Jul 09 15:58:42  [info] Running task: Fix Schema on civicrm_action_schedule
  
  Jul 09 15:58:43  [info] Running task: Upgrade DB to 4.7.20: SQL
  
  Jul 09 15:58:44  [info] Running task: Add activity_status column to civicrm_mail_settings
  
  Jul 09 15:58:44  [info] Running task: Finish Upgrade DB to 4.7.20
  
  Jul 09 15:58:45  [info] Running task: Begin Upgrade to 4.7.21
  
  Jul 09 15:58:46  [info] Running task: Upgrade DB to 4.7.21
  
  Jul 09 15:58:47  [info] Running task: Finish Upgrade DB to 4.7.21
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-11T22:30:28.297Z
Comments.Text: Re System Status page empty, have you tried clearing CiviCRM's cache and then browser's cache and reload the System Status page, it sounds to me like a caching problem.
Comments.UserDisplayName: Andrei
Tags: <wordpress><upgrade><indices><status>
Title: Missing indices status after upgrading to CiviCRM 4.7.21 on WordPress 4.8
ThreadText: # Missing indices status after upgrading to CiviCRM 4.7.21 on WordPress 4.8
  
  (Asked by: username_0 on 2017-07-09)
  
  I successfully upgraded to CiviCRM 4.7.21 (from 4.7.17), and everything seems to be working properly. However, I got a critical status error, "Performance warning: Missing indices". After reading How to find and/or fix missing indices? I tried bringing up the status screen to correct the error, but the status screen comes up empty. However, I continue to see "System Status Critical" highlighted in pink near the top of the screen.  (See screenshot below.)
  
  I downloaded the latest log from /wp-content/uploads/civicrm/ConfigAndLog, but I don't see anything relating to indices in it. (Log included below.)
  Any ideas where to go from here?
  Jul 09 15:58:28  [info] Running task: Cleanup old files
  
  Jul 09 15:58:29  [info] Running task: Begin Upgrade to 4.7.18
  
  Jul 09 15:58:30  [info] Running task: Upgrade DB to 4.7.18
  
  Jul 09 15:58:31  [info] Running task: Update Kenyan Provinces
  
  Jul 09 15:58:31  [info] Running task: Upgrade DB to 4.7.18: SQL
  
  Jul 09 15:58:32  [info] Running task: Finish Upgrade DB to 4.7.18
  
  Jul 09 15:58:33  [info] Running task: Begin Upgrade to 4.7.19
  
  Jul 09 15:58:34  [info] Running task: Upgrade DB to 4.7.19
  
  Jul 09 15:58:34  [info] Running task: Drop Column current_period_opening_balance From civicrm_financial_account table.
  
  Jul 09 15:58:35  [info] Running task: Drop Column opening_balance From civicrm_financial_account table.
  
  Jul 09 15:58:36  [info] Running task: CRM-19961 - Add domain_id column to civicrm_sms_provider
  
  Jul 09 15:58:37  [info] Running task: CRM-19961 - Populate domain id table and perhaps add foreign key
  
  Jul 09 15:58:37  [info] Running task: Upgrade DB to 4.7.19: SQL
  
  Jul 09 15:58:38  [info] Running task: CRM-16633 - Add "Change Case Subject" activity
  
  Jul 09 15:58:39  [info] Running task: Add is_public column to civicrm_custom_group
  
  Jul 09 15:58:40  [info] Running task: Finish Upgrade DB to 4.7.19
  
  Jul 09 15:58:41  [info] Running task: Begin Upgrade to 4.7.20
  
  Jul 09 15:58:41  [info] Running task: Upgrade DB to 4.7.20
  
  Jul 09 15:58:42  [info] Running task: Fix Schema on civicrm_action_schedule
  
  Jul 09 15:58:43  [info] Running task: Upgrade DB to 4.7.20: SQL
  
  Jul 09 15:58:44  [info] Running task: Add activity_status column to civicrm_mail_settings
  
  Jul 09 15:58:44  [info] Running task: Finish Upgrade DB to 4.7.20
  
  Jul 09 15:58:45  [info] Running task: Begin Upgrade to 4.7.21
  
  Jul 09 15:58:46  [info] Running task: Upgrade DB to 4.7.21
  
  Jul 09 15:58:47  [info] Running task: Finish Upgrade DB to 4.7.21
  
  **Tags:** wordpress, upgrade, indices, status
  
  > **Comments:**
  > **username_1**: Re System Status page empty, have you tried clearing CiviCRM's cache and then browser's cache and reload the System Status page, it sounds to me like a caching problem.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-07-10. Score: 1
  
  This problem has been raised before and you can view the thread at [How to find and/or fix missing indices?](https://civicrm.stackexchange.com/questions/18487/how-to-find-and-or-fix-missing-indices)
  
  There is also an entry in JIRA at the [following link](https://issues.civicrm.org/jira/projects/CRM/issues/CRM-20533?filter=allissues) <https://issues.civicrm.org/jira/projects/CRM/issues/CRM-20533?filter=allissues>
  
  Hope this helps.
  
  > **Comments:**
  > **username_3**: I, too, got the Missing Indices Performance Warning on Wordpress 4.8 when upgrading to 4.7.22 (testing out on my local XAMPP instance before going live). I thought that maybe upgrading from 4.16 was too much of a stretch, so I then just upgraded to 4.7.19. Same issue as documented here and in a few other posts. Are we OK if we just ignore this warning (orange instead of red) and wait for a further Civi update that should fix everything? I don't quite follow exactly what to do if I really must repair the DB before going live.  
  > **username_3**: FYI - my error was: "Operation failed: Update Indices DB Error: already exists Debug information: CREATE UNIQUE INDEX UI_case_contact_id ON civicrm_case_contact (case_id, contact_id) [nativecode=1061 ** Duplicate key name 'UI_case_contact_id']"  I then looked at JIRA CRM-20533 and saw a suggested SQL query to remove and re-create UI_contact_id. Note that table is empty for me and the suggested JIRA repair doesn't fix things.  
  > **username_3**: I was able to execute steps 3-5 on our local Civi instance (including the error recovery suggestions) in https://civicrm.stackexchange.com/questions/18487/how-to-find-and-or-fix-missing-indices. I would still like to know if this is even necessary as I don't have MySQL root on our live instance and it's a bit klunky to export/import back/forth from live to local versions, although I can do it.  
  
  ---
  
  ### Answer by username_4 on 2017-07-10. Score: 0
  
  You can execute run indices under system status, and tail the CiviCRM log for any exceptions during the process (such as rebuilding the foreign keys).
  
  I had a few fatal errors, so the process would never complete due to existing foreign key constraints in the DB. Idid a MySQL dump of the DB and commented out the offending foreign keys which were then recreated by the CiviCRM update indices process.
  
  Unfortunately can't grab the URL directly because it has been run. I could check your Javascript console in the browser to see why the status page isn't loading. I believe it does an AJAX request to populate the status page.
  
  
  ---
  
  