How to troubleshoot a missing index or constraint?