If there are indices problem, you can get false indices displayed on
Administer -> Administration Console -> System Status page.
It will list the wrong indices in your table with the
Update Indices button to rebuild them.
The above button tries to delete the listed false indices and recreate them in the correct order. If for some reason the
Update Indices is unable to clear the message, you can manually delete the indices from the
Table Name shown in the above screen and then create them using the same button.
Note that you can only see this message and button if your civi version is <= 4.7.29. From 4.7.30, this message is hidden via
So, on version >= 4.7.30, as this UI is not present, you can try rebuilding them using the api via API explorer from
Support -> Developer -> API Explorer with
System and Action =
updateindexes (present on all versions).