We have already studied what DRI can do and by how much it can increase performance, in the previous recipe. This recipe is also related to DRI, which shows that even a single small option can play a big role as far as performance is concerned.
We are going to see the
sys.foreign_keys system view to get information about the foreign key we defined in the table schema. Concentrate on the field
is_not_trusted, in the view, which gives you information whether your foreign key is trusted or not.
Follow the steps given here to perform this recipe:
IF OBJECT_ID('ProductDemo') ...