News for hackers. Stuff that matters.
Re:Advanced SQL window function quiz by drraid0 on Thursday February 08, 2018 @08:09PM (#16337080)
Meanwhile I'm stuck with mysql 5.4 without foreign keys, cuz, you know, performance. (The main db for a billion dollar security company)
Re:Advanced SQL window function quiz by barrkel on Friday February 09, 2018 @06:06AM (#16339356)
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).

Re:Advanced SQL window function quiz by Alupis on Friday February 09, 2018 @02:34AM (#16338565)
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...

Re:Advanced SQL window function quiz by zimpenfish on Friday February 09, 2018 @05:24AM (#16339209)
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.)

Re:Advanced SQL window function quiz by dwanvik on Monday February 12, 2018 @09:03AM (#16358574)
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...