Does anybody know, does FK reduce insert/update operations in MySQL? I use engine INNODB.
INDEX
is checked to verify the existence of the appropriate row in the other table. This is a minor performance burden during writes.SELECT ... JOIN
for which you failed to explicitly provide the appropriate index, the implicit index produced by some FK may come into play. This is a big benefit to some JOINs
, but does not require an FK, since you could have added the INDEX
manually.ON DELETE or UPDATE
, then even more work may be done, especially for CASCADE
. The effect of CASCADE
can be achieved with a SELECT
plus more code -- but not as efficiently as letting CASCADE
do the work.Does any of this sound like "reducing insert/update operations"?