Does introducing foreign keys to MySQL reduce performance

Posted by Tam on Stack Overflow See other posts from Stack Overflow or by Tam
Published on 2010-04-11T19:27:30Z Indexed on 2010/04/11 19:33 UTC
Read the original article Hit count: 216

Filed under:
|
|

I'm building Ruby on Rails 2.3.5 app. By default, Ruby on Rails doesn't provide foreign key contraints so I have to do it manually. I was wondering if introducing foreign keys reduces query performance on the database side enough to make it not worth doing. Performance in this case is my first priority as I can check for data consistency with code. What is your recommendation in general? do you recommend using foreign keys? and how do you suggest I should measure this?

© Stack Overflow or respective owner

Related posts about sql

Related posts about database-design