Does MySQL Workbench automatically create indexes for foreign keys?

When I create a foreign key in MySQL Workbench, a new record appears on the Indexes tab with the same record as the foreign key I just created.

Is this actually a foreign key appearing on the Indexes tab for some reason? Or is MySQL Workbench trying to be useful and creating an index for me, knowing that I will probably select this column and give it (embarrassed) the same name as the foreign key?

+3
source share
2 answers

It does MySQL, not a workbench.
And yes, it is useful to create an index when creating a foreign key constraint.

+6
source

innodb , . , MySQL Workbench , SQL script, MySQL Workbench. , , , , .

+1

All Articles