Referential Integrity vs. Performance

  • Also, please, a join, or even 3 or 7 or 20, is not some OMG HAIR ON FIRE performance issue. It's not. In fact, relational storage engines are very good at doing JOINs. Almost like they were designed that way. Further, the optimizer uses enforced referential constraints (a foreign key that uses WITH CHECK) as part of the optimization process, ensuring superior performance because of the constraint. Foreign keys can, and do, improve performance. Oh, yes, they do. Don't be timid about this. Go in guns blazing. We're right. They're wrong.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • You’ve brought up some interesting points. That I will surely look into. One reason I posted my question was that I’ve always used and never had a problem with these lookup tables. Therefore until speaking with these other programmers I had no reason to question what I’ve always taken as the proper way to do things.

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply