This question already has an answer here:
- How to find and/or fix missing indices? 7 answers
Upgraded to 4.7.20 today. As others on this thread have experienced in earlier release(s), I promptly got the "missing indices on some tables" warning. Of course, I tried the "Update Indices" button, and of course, all it gave me was a spinning logo for about two seconds followed by no change in status.
Looking at my error log, this jumped out at me:
wp-content/plugins/civicrm/civicrm/packages/DB.php(984): PEAR_Error->__construct("DB Error: already exists", -5, 16, (Array:2), "CREATE UNIQUE INDEX UI_case_contact_id ON civicrm_case_contact (case_id, cont...")
So I opened phpMyAdmin, and sure enough, the UI_case_contact_id index does in fact exist on the civicrm_case_contact table. Which makes me wonder if I'm getting a missing indices warning because the system "perceives" incorrectly that there's no UI_case_contact_id index when in fact there already is.
Since I know just enough about Civi's database structure to be dangerous (but not nearly enough to competently fix anything that can go wrong with it), might anyone please enlighten me?