November 7, 2005
MySQL Foreign Keys
This is a note for myself having investigated a problem related to MySQL recently.
Version 4.1 of MySQL makes some changes to the implementation of foreign key constraints.
In particular, "InnoDB needs indexes on foreign keys and referenced keys so that foreign key checks can be fast and not require a table scan. Starting with MySQL 4.1.2, the index on the foreign key is created automatically. In older versions, the indexes must be created explicitly or the creation of foreign key constraints fails."
Posted to Software Development by Keith PittyComments
Post a comment
