Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When I add a foreign key constraint to my table, SHOW INDEX doesn't show any new indices, but the overall space used by the indices in that table increases. Apparently, the index for the field I put a constraint on does get created implicitly, but MySQL doesn't want me to tell about its existence. Is there a way to see those implicit indices anyway?

The table type is InnoDB.

share|improve this question
    
Is one or more of the columns of the foreign key included in another index? –  Lennart Sep 4 at 23:39
    
Yes, it's a part of another composite index. I'm not sure whether MySQL is just relying on that index, or creating a new one. The fact that the constraint creation operation takes quite a while and the table file gets bigger is sort of indicative that some new index might be created, but I don't quite know how to be certain here. –  dragonroot Sep 5 at 14:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.