O'Reilly logo

Microsoft SQL Server 2012 Performance Tuning Cookbook by Bihag Thaker, Ritesh Shah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Improving performance by Declarative Referential Integrity (DRI)

Declarative Referential Integrity (DRI) ensures integrity of the database by a properly managed primary key and foreign key relationship. Correctly defined primary keys and foreign keys help query optimizer to select the best-suited execution plan for the query.

It has been observed many times that developers create a master table with a primary key and use that primary key field in the child table but don't define a foreign key in the table schema. This is not a good practice because by initiating a foreign key in the child table, you ensure that each record in the child table has a reference key in the parent table. This is a good thing, right? But, let us clarify that, by maintaining ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required