Does MySQL InnoDB always require an index for each foreign key constraint?

I am using phpMyAdmin. To configure a foreign key constraint using InnoDB (in the "View Relationships" section of the "Structure" tab), it seems to me that I need to add an index for the field to which I want to add a constraint. This obviously affects the performance of attachments / updates in the table, especially if there are several restrictions that I want to add. Can I specify a foreign key constraint or relational integrity in InnoDB without having to create an index for the required field?

Thanks a lot JS, London

+3
source share
2 answers

MySQL:

InnoDB , , . , , . . ( , .)

+7

1 . .
, collumn ( , ), .

3 :
-
-
-

+1

Source: https://habr.com/ru/post/1722682/


All Articles