Hacker News new | ask | show | jobs
by gaius 3234 days ago
Was this a big deal in the past?

In MySQL, yes. It lacked the concept of foreign keys.

1 comments

Lack of foreign keys does not effect performance.

In fact, having foreign keys is a net-negative performance-wise because it means that each foreign key must be checked for every insert/update/delete.

Foreign keys can improve performance, in some cases:

https://stackoverflow.com/a/8154375/533120

Errm, we're talking about performance of joins
Joins will use the regular index matching it against the join condition just like a where clause would.
They don't help with that either.
Perhaps parent is conflating indexes with constraints? I believe InnoDB creates indexes automatically with foreign keys.