Hacker News new | ask | show | jobs
by drraid0 3051 days ago
Meanwhile I'm stuck with mysql 5.4 without foreign keys, cuz, you know, performance. (The main db for a billion dollar security company)
3 comments

MySQL foreign keys add locks to referenced rows, and can have surprising effects on concurrent queries, particularly if you aren't running at read committed or lower isolation level.

There's also this: https://bugs.mysql.com/bug.php?id=48652 - still open after all these years (and yes I know there are much longer open bugs).

InnoDB storage engine is available in 5.4, you don't have to use only MyISAM[1].

However, depending on your application, you may be enforcing these constraints elsewhere and not need them at the engine level, even if it's a nice-to-have.

[1] http://download.nust.na/pub6/mysql/doc/refman/5.4/en/storage...

I know a database that's using InnoDB tables but also has no foreign keys and, indeed, JOINs are forbidden.

(And yes, the workflow does include actions that involve multiple tables in one go.)

Check out the new MySQL 8.0 release candidate. Is has windowing functions now.

https://dev.mysql.com/doc/refman/8.0/en/window-functions.htm...