MySQL - are FK's useful / viable in a web app?

Posted by yoda on Stack Overflow See other posts from Stack Overflow or by yoda
Published on 2010-06-02T11:26:00Z Indexed on 2010/06/02 14:43 UTC
Read the original article Hit count: 265

Filed under:
|
|

Hi all,

I've encountered this discussion related to FK's and web applications. Basically some people say that FK's in web applications doesn't represent a real improvement and can even make the application slower in some cases.

What do you guys think, what's your experience?

--

A quote from Heikki Tuuri, creator of InnoDB engine, founder and CEO of Innobase:

InnoDB checks foreign keys as soon as a row is updated, no batching is performed or checks delayed till transaction commit Foreign keys are often serious performance overhead, but help maintain data consistency

Foreign Keys increase amount of row level locking done and can make it spread to a lot of tables besides the ones directly updated

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql